LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL interface with complex structure type

I need to call a DLL function, for data acquisition, through LV. I have to pass the following complicated structure type:
typedef struct{
unsigned long HUGE *s0;
unsigned long far *region;
unsigned char far *comment0;
double far *cnt;
HANDLE hs0;
HANDLE hrg;
HANDLE hcm;
HANDLE hct;
}ACQDATA;

the function prototype to be called by LV6 is:
int APIENTRY GetData(ACQDATA FAR *Data);
this function is meant to return data pointers so it modifies the variable. Has anybody an idea how the LV cluster to pass should look like? And what about the settings in the Call Library Function window? Unfortunately I have the LV Base Package, so I don't think I can use a custom C routine to convert variables between LV and DLL function
(am I mistaken?).

Please help
0 Kudos
Message 1 of 2
(2,880 Views)
This is a pretty interesting structure! In a situation such as this, I might possibly create a wrapper DLL that you would call from LabVIEW with LabVIEW data types and then convert these into the structure that you are working with. It's worth a try and it may save some headache!
J.R. Allen
0 Kudos
Message 2 of 2
(2,880 Views)