Texo Sequencing

The latest Texo version is available here. As of July 2009 the latest tested version is 1.10.1. Tony deSouza-Daw wrote a very helpful guide in getting started with Texo. Below is his guide with very minor edits.

Using Visual C++ Express with the Windows SDK
This article describes what you need to do to build Win32 applications using Visual C++ (VC++) Express and the Windows SDK for Windows Server 2008 and .NET Framework 3.5.

Steps Open the VC++ Express command window and check the PATH (type PATH and return) to see if the v6.1 directory has been added.
 * 1) Download or obtain a copy of Microsoft Visual C++ 2008 Express and Windows SDK with .NET Framework 3.5.
 * 2) Install Microsoft Visual C++ 2008 Express.
 * 3) Install the Windows SDK for Windows Server 2008 and .NET Framework 3.5.
 * After installing the Server 2008 SDK, the registry key is set to point to the new Server 2008 SDK (v6.1) content.
 * If you install the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories manually.
 * The SDK Configuration Tool has a GUI interface but it works only on the Visual Studio Retail (non‐Express) SKUs. (This is scheduled to be fixed in the next release.) You will use the SDK Configuration tool at the command line with VC++ Express.
 * Launch the Windows SDK Command Window (Start, All Programs, Microsoft Windows SDK v6.1, Command Window)
 * CD to \Program Files\Microsoft\Windows\v6.1\Setup>
 * Type: WindowsSdkVer.exe ‐version:v6.1
 * This command will set the Windows SDK for Windows Server 2008 (v 6.1) as the 'current' SDK' for Visual Studio to use for headers, libraries and tools. Use '‐version:v6.1' for the Windows Server 2008 SDK content. Use '-version:v6.0A' for the Visual Studio 2008 content.
 * 1) Validate that the directories were updated.

Please Note: The MFC (Microsoft Foundation Classes) is not included in the installation of Visual Studios Express or Windows Platform SDK. Hence errors like "fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory" will occur if the project requires foundation windows API. Compile with a copy at Visual Studio Standard or Professional, to overcome these errors.

Installing the Ultrasonix Texo Library

 * 1) Download the latest Texo SDK and unzip the package in an appropriate place.
 * 2) Open Visual Studio Express. Open the console demo project.
 * 3) The files have been created by a previous version of Visual Studios. A message will ask to convert to the current version. Click 'Yes to all'.
 * 4) Clean Build and Build a release project.
 * 5) Go to the release directory (.../bin/r) and launch the executable. If an error appear missing 'iconv.dll', 'libxml2.dll' or 'zlib1.dll' then copy ALL the dll's in common directory (.../bin/common) and paste them in the release directory (.../bin/r). Now the executable should work with no problem. This is a result of the old Visual Studio Compilation version to the new version.

Please Note: An error message indicating a missing file msvcrtd.dll will occur on a debug build. This is a result that the Texo dynamic link libraries (DLL) were compiled on an older version of Visual Studio (Visual Studio 6.0). This means that you cannot debug a Texo compilation through Visual Studio. However, the release version will work fine. To overcome this, obtain and install Visual Studio 6.0 or just work with the release version and put debug information, such as 'printf("Debug 10: %d", linesize);' where needed.

References:
 * http://blogs.msdn.com/windowssdk/archive/2008/02/22/using-visual-c-2008-expresswith-the-windows-sdk-detailed-version.aspx
 * http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/a0732952-7fea-403a-986a-b479e3ee6b23/

This concludes Tony deSouza's guide. In addition to his write-up, there are a few additional recommendations. After experimentation (a post was also made by ImperialME), the following steps will allow you to debug Texo compilation through Visual Studio.
 * 1) Download msvcp60d.dll and msvcrtd.dll from the internet.
 * 2) *http://www.dll-files.com/dllindex/dll-files.shtml?msvcp60d
 * 3) *http://www.dll-files.com/dllindex/dll-files.shtml?msvcrtd
 * 4) Copy the above files into \bin\d.
 * 5) Copy iconv.dll, libxml2.dll, and zlib1.dll found in \bin\common into \bin\d.

If you receive the output 'texo-cdemo.exe: Native has exited with code -1' when you run the code, there are two main causes. The first is that the code must be run on the actual SonixRP machine. If it is run on a different machine, the initialization of the  ultrasound machine will fail and force exit the program. Another possibility is that another program that uses the SonixRP machine is already running. Only one program can access the machine. Shutdown the program that is accessing the ultrasound hardware first, and then re-execute the code. At this point, the demo code should run and the black console screen will pop up.