09-25-2006 12:17 PM
09-25-2006 12:24 PM
09-26-2006 02:23 AM
Good morning,
Thank you for your message. I know how to set up a Labview dll function call that expects a pointer, but I don't know how I'm to wire up the Labview equivalent, if you see what I mean. If I give it the first element of the array only (address of array in C), Labview is happy, but I'm not convinced I'm doing the right thing.
Thanks in advance for any help,
Regards,
Alan
09-26-2006 07:29 AM
09-26-2006 10:56 AM
There is a difference in passing a char type and a char array (string). First of all, C expects the string to end with the NULL character (\0). You need to append the NULL to the string, then convert the string to a byte array (String to Byte Array function). Then in order to pass the array to the C DLL, you need to declare the parameter as Type=Array, Data Type=U8, Dimensions=1, Array Format=Array Data Pointer. This will pass the string into the DLL.