LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with receiving PChar variable from DLL

Hi,

 

I have DLL with function inside:

function CCD_GetSerialNum (ID : Integer; Var sernum :PChar) : boolean; stdcall;

 

To use this one in LabVIEW I've created CLFN with function prototype:

int32_t CCD_GetSerialNum(int32_t *ID, PStr sernum); (calling convention - stdcall)

 

I wired input parameters: 0 for ID and empty string for sernum, but function doesn't work... It returns some big value instead of 1 (1 is equivalent to True as I understood), and sernum is empty.

 

Any suggestions?

 

PS function works properly in Delphi programm.

0 Kudos
Message 1 of 4
(3,450 Views)
I suspect you're having the same problem as the one discussed here.
0 Kudos
Message 2 of 4
(3,433 Views)

Hello, I have the same problem, and the other topic doesn't help me at all, do you have the solution to your problem?

 

Thanks,

 

Fabrice

0 Kudos
Message 3 of 4
(3,228 Views)

Out of curiosity, if your function returns a false, is it represented as a 0?

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,215 Views)