LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

handle pointer in labview 7.1.1 ??

Smiley Very HappyHello, I'm developing a Vi which is using a DLL. The problem is that the function I want use had parameters that are not directly integer values, but pointer on a structure with integer values. I do the DLL function call and the prototype of the function is:
Unsigned char BFLOADER_ComConfig(Char TargetType, void *ComConfig, Unsigned Long *ComDevice).
This prototype looks good regarding the DLL fuction specification but I had this error message when executing the VI:
 
The vi stop at the Calling DLL Function process 0x5A4.
 
Is it the way to call the parameters which are not good? or simply a bad use of the DLL?
 
How can I interpret the 0x5A4 error code?
 
Thanks, pinto_armindo@yahoo.fr
 
0 Kudos
Message 1 of 3
(2,779 Views)
I'm not sure about the 0x5a4 error code. Never seen that one.

It sounds like you're trying to create a cluster to be the "ComConfig" structure and passing that. Is that right? If so, you might want to take a look at the example that ships with LabVIEW about passing all sorts of data into DLLs. You can find the example in the LabVIEW directory in the "examples\dll\data parsing" directory.

You may also want to take a look at these:
Controlling an Instrument That Requires DLL Functions That Use Pointers to Complex Data Structures
Using Structures in a DLL with Clusters in LabVIEW
Passing a Variety of Data Types from DLL to LabVIEW

At worst case you may need to write a simple wrapper DLL that interfaces between LabVIEW and the DLL you're trying to use.
0 Kudos
Message 2 of 3
(2,755 Views)
Thanks for your tutorials, i'll search and contact if still problems
 
0 Kudos
Message 3 of 3
(2,752 Views)