NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing a char *varname from test stand to a DLL

Hi,
I have a DLL (externally supplied) that is documented to require an input of a "unsigned char *pucBuffer". Does anyone know what type of TestStand variable, and how I would send it? As I understand this, it's a pointer to an unsigned 8 bit number. BUT! the function controls a 32 bit device, and expects at least 4 of the 8 bit values or a single transaction. That leads me to believe ( maybe incorrectly) that I really need an array of unsigned chars. However, if I try sending that type of variable from TS to my DLL, it complains that it was handed an array and was looking for a number.

thanks in advance for any help,
David Dupont
0 Kudos
Message 1 of 2
(3,677 Views)
Hi David,

To pass the parameter of type unsigned char*, you don't need an array of unsigned chars. In the Edit LabWindows/CVI Module Call Window, check the Edit Prototype checkbox. Select your unsigned char* parameter and modify the Parameter Details. Select the category to be "String" and the Type to be "C String [const]". Then in the Value expression enter your string/character.

Hope this helps. Happy Holidays!

SijinK
National Instruments
0 Kudos
Message 2 of 2
(3,664 Views)