The software I'm developing uses DLLs to control equipment using VISA so that they can be easily interchanged and created by customers. I'm making C templates so a customer can simply fill in commands and create a driver DLL. The problem I'm running into is that I have to pass the VISA resource to the call library node differently depending on if the DLL was created in LabVIEW or C. I do all the opening/closing of the reference in the program, so I want to simply pass the reference to the DLL where only viWrite will be called.
If I set the call library node parameter to adapt to type, the LabVIEW created DLL works. If I set it to uint32, the C DLL works. If I switch either, I get "The given session or object reference is invalid."
The function call in the C code is: Operate(uintptr_t *VISAresource). I took that from the LabVIEW created header file when building the DLL.
So is there something I'm not getting to be able to call both types of DLL from the same call library node? I'd hate to have to incorporate both calls in my code.