NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass a single character to dll (as a parameter)

How do pass a single character to dll (as a parameter). This is a third party dll that i am unable to change.
 
e.g.: int functionName(char* process, char myChar);
 
 
0 Kudos
Message 1 of 6
(3,308 Views)
Did you try passing it as a U8 instead of a string?

Matthew


Message 2 of 6
(3,302 Views)

My apoligies, I am trying to pass a char from Teststand. Passing as a char is not one of the Category

 

 I tried sending (for example) : Locals.myChar[0].  Which is acceptable in C++, but gives me an error via Teststand.

0 Kudos
Message 3 of 6
(3,296 Views)
Try passing Asc(Locals.myChar[0]) with the parameter category set to Numeric and the Type set to Unsigned 8-bit Integer.
Message 4 of 6
(3,293 Views)
James / Matthew,  with some playing around, this was exactly what I needed. Thanks for the explanation James...
0 Kudos
Message 5 of 6
(3,280 Views)

Just for the record, if Locals.myChar was a string instead of a numeric array, then you would instead need Asc(Mid(Locals.myChar, 0, 1))

Array subscript syntax would be nice for strings. I'll enter a suggestion for it.

0 Kudos
Message 6 of 6
(3,271 Views)