NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Receive data to teststand from dll file

Solved!
Go to solution

Hi,

 

I have the function below in my dll file but I am having problem receiving the parameters to teststand.

 

int GetEvent (int pid, char *msg, int &msgSize)

 

pid is the input parameter

*msg will be the received string

&msgSize will be the received strength length in integer.

 

Any idea on how to approach this problem?

 

Regards

Ray

0 Kudos
Message 1 of 3
(3,328 Views)
Solution
Accepted by topic author boys2men

Hello Ray,

 

Are you lettings TestStand use the type definition to define the function parameters in your TestStand DLL call? If so, TestStand typically expects input strings to be typed as 'char *', and output strings to be typed as 'char[x]', where x is some default numeric size; it can also be just 'char[]').

 

Alternatively, you can override what TestStand thinks is the prototype for msg and change the TestStand type from C String (const) to C String Buffer in the parameter property settings. You'll also need to give the buffer a default size that is larger than what you expect to receive in the Buffer size field.

 

Note that refreshing the prototype will reset this override, so changing the type library in the source would be preferable.

 

Hope this helps.

 

-Jack

0 Kudos
Message 2 of 3
(3,309 Views)

Hi Capt. Jack,

 

Thanks it worked.

0 Kudos
Message 3 of 3
(3,244 Views)