Locating the Correct DLL in 32-bit TestStand and 64-bit TestStand

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

TestStand executes C/C++ DLL code modules in-process. Similarly, TestStand executes LabWindows/CVI code modules in-process when you use the LabWindows/CVI Run-Time Engine. Although TestStand supports executing LabWindows/CVI code modules out-of-process using the LabWindows/CVI Development Environment, TestStand requires the bitness of the external code module to match the bitness of TestStand. Therefore, you must use separate 32-bit versions and 64-bit versions of DLL code modules for the C/C++ DLL Adapter or the LabWindows/CVI Adapter to simultaneously support 32-bit architectures and 64-bit architectures.

TestStand automatically locates the correct versions of C/C++ and LabWindows/CVI code modules in non-shared search directories, such as the <TestStand Public> directory. If the prototypes of the functions that the 32-bit version and 64-bit version of the DLLs export are identical and each version resides under the correct search directory, TestStand sequences and step types that depend on the code modules execute in 32-bit TestStand or in 64-bit TestStand without modification. (For prototypes that change, see Bitness Conditional Code for DLLs with Different 32-bit Interfaces and 64-bit Interfaces.)

If you migrate code modules you specify with paths relative to the sequence file or another location that 32-bit TestStand and 64-bit TestStand share and you no longer intend to support the 32-bit architecture, you can replace all DLL code modules with 64-bit versions in-place. If the prototypes of the functions that the 32-bit version and the 64-bit version of the DLLs export are identical, TestStand sequences that depend on the code modules execute in 64-bit TestStand but no longer execute in 32-bit TestStand.

If you migrate code modules you specify with paths relative to the sequence file or another location that 32-bit TestStand and 64-bit TestStand share and you need to simultaneously support the 32-bit architecture and the 64-bit architecture, complete the following steps to associate the bitness-specific version of the DLL with a step.

  1. Create a win32 subdirectory and an x64 subdirectory in the directory that contains the DLL.
  2. Move the 32-bit version of the DLL to the win32 subdirectory.
  3. Place the 64-bit version of the DLL in the x64 subdirectory.
  4. Update the module path to $(Platform)\filename.dll in the code module specification. 32-bit TestStand converts the path to win32\filename.dll, and 64-bit TestStand converts the path to x64\filename.dll.

Regardless of whether you need to simultaneously support 32-bit TestStand and 64-bit TestStand, National Instruments recommends using the $(Platform) path macro and platform subdirectories for all C/C++ and LabWindows/CVI code modules you call that reside in directories that 32-bit TestStand and 64-bit TestStand share to simplify future migration.


See Also

Bitness-Conditional Code for DLLs with Different 32-bit Interfaces and 64-bit Interfaces

WAS THIS ARTICLE HELPFUL?

Not Helpful