LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV data types for C++ DLL

I have created a DLL in VC++ that someone in my organization needs to call from LabView. The declarations for my exported functions are like this example:
 

extern

"C" __declspec(dllexport)int DLL_Funct(int portnum, char str_data[33], unsigned char csn[4]);

The function above passes an integer and a null terminated 32 char string and gets back a 4 byte uchar value.

The LV programmer is having trouble getting my DLL functions to work. I suspect it has to do with different data types or byte alignment or something like that.

I have zero experience with LV. Can someone please tell me what the equivalent function declaration should be in LV and whatever else I should tell my associate that might help make his code work?

Thanks.

Dave

DRC
0 Kudos
Message 1 of 2
(2,489 Views)
Do you know what the LabVIEW programmer is doing? The "str_data" string parameter should be of Type "string" in the parameters list for the Call Library Function Node setup. The "csn" can be passed as an array of unsigned 8-bit integers.
0 Kudos
Message 2 of 2
(2,474 Views)