Solution
This issue can occur when pointer-related parameters are incorrectly configured in the Call Library Function Node.
In 32-bit LabVIEW, pointers and hardware handles are 32-bit values, while in 64-bit LabVIEW, they require 64-bit values. If the Call Library Function Node is configured to pass these parameters as standard 32-bit integers, LabVIEW passes an incorrect (truncated) pointer value to the DLL. This can result in initialization failure or undefined behavior.
To resolve this issue, configure pointer-related parameters to use a platform-independent data type:
- Open the VI that calls the DLL.
- Double-click the Call Library Function Node used for hardware initialization.
- Navigate to the Parameters tab.
- Identify parameters representing:
- Memory addresses
- Hardware handles
- Pointer types (for example,
void*) - Size-related types (for example,
size_t)
- Change the Data Type for these parameters to:
- Signed Pointer-sized Integer or
- Unsigned Pointer-sized Integer
- Verify that the parameter passing mode (Value or Pointer to Value) matches the DLL function prototype.
- Verify that the Calling Convention (for example, C or stdcall) matches the DLL documentation.
- Save the VI and run it in LabVIEW 64-bit.
Using the Pointer-sized Integer type ensures that LabVIEW passes pointer values using the correct size for the current platform (32-bit or 64-bit).