NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

abstract pointer

Hello all,

I'm new to TestStand so please bare with me.  I need to call a function from a DLL but the DLL does not have type information available and I can't utilize the code templates.  I have to manually setup the parameters for this function and I am having some trouble doing so. 

Here are two example function calls that use the abstract pointer p

void Init(&p), initializes Handle
void Util(void * p)

What is the TS equivalent for this parameter?

-------------------------------------------------------------------------------

In the past, I was able to use the TS code template feature with the same DLL described above, and this would populate the parameter fields for me.  After uninstalling/installing LabView's runtine engines 6.1 and 7.0, I am no longer able to utilize the type information for the DLL.  I have reinstalled the TS code templates as well and this did not help.  Any suggestions?


0 Kudos
Message 1 of 2
(2,801 Views)
Hi robnerd,

If the handle (&p) is actually a pointer, you can just use a normal signed 32-bit integer (long) by reference from the TestStand side when calling Init. Then, when you call Util, you can pass the same long from before by value. If both functions are running in the same DLL/memory space, the long you are passing by value will really just be a 4 byte pointer, which the DLL can then use to get at what the original handle was pointing to. The bottom line is, TestStand doesn't allow you to explicitly specify a parameter as void*.

If the handle is actually a struct, you will need to create a corresponding type that has struct passing enabled in order to ensure the correct packing.

Regards,
0 Kudos
Message 2 of 2
(2,778 Views)