NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing parameters. DLL -> TestStand

Hello,
is there any possibility to pass something like:

char *ArrayOfStrings[NUMBER]

_to_ TestStand, where i have Local variable of CustomType "Array of Strings"? I pass this variable as reference to DLL expecting it to change or initialize it in such way, that I will have local copy of "ArrayOfStrings" in my sequence.

If there is, please help me, because i've tryed a lot of things, but nothing was working.

How should I define CustomType to be passed ? (Embedded array of pointers to string and then "Pass by reference" in module specification doesn't seems to work).

Unfortunally i have not found any useful information in "User Manual" or "Programmers Manual". Could someone provide me with short but working example of ho
w to do it.

BTW there was no problems with passing same structure to DLL function.

p.s. I use regular DLL that dynamically linked to MFC as described in Technical Note 011 of MSDN (Visual C++ 6.0)
0 Kudos
Message 1 of 3
(3,342 Views)
What is the definition of "Array of Strings"? If it is just an array of strings you maybe could use "TS_PropertySetValStringByOffset()" function rather than passing the array as a parameter.
0 Kudos
Message 2 of 3
(3,342 Views)
There are some good examples in the \TestStand\Examples\AccessingArrays directory. I wrote a little DLL (attached) that will create an array of strings and write a value to a new element. There are several CVI functions in the TestStand API library that are useful for dealing with arrays. My example will create FileGlobals.arrayOfStrings[] and add a new element to it with the value of "string".
Download All
0 Kudos
Message 3 of 3
(3,342 Views)