Search code examples
c++pointersdllparameter-passinglabview

How to pass a parameter of type pointer to PVOID from LabView to DLL?


I'm calling a DLL written in C++ from LabView. The function prototype is:

ULONG DAQ_Open(PVOID *pHandle);

How can I pass the correct parameter from LabView? Is it just impossible to pass parameters of type pointer to pointer from LabView to DLL?


Solution

  • As long as you're not expecting to pass a pointer to a LabVIEW VI to use as a callback (which is a seperate, and much more difficult answer), the parameter is just a pointer. When you configure your call library node, use the type "numeric" and the data type "unsigned pointer-sized integer" and pass "pointer to value."

    This should give you a prototype of: void funcName(uintptr_t *arg1);