NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing struct to DLL using TestStand

I would like to pass structures to the function call in the DLL. Does Test stand supports passing structured.

I have a function prototype like this

LONG _stdcall ReadData(HANDLE hInstance, pDataStruct Trans);


#pragma pack(push, 1)

typedef struct _DataStruct {
BYTE Type;
BYTE DevAddr;
WORD wMemoryAddr;
WORD wCount;
BYTE Data[256];
} DataStruct , *pDataStruct ;

#pragma pack(pop)

I would like to display the Data filed after the function call.

remaining parameters to the structure are inputs.

Please point me to any tutorial on TestStand that can help me or Give me a detailed instructions on how to configure it.

Thanks in advance.
Lak
0 Kudos
Message 1 of 2
(3,158 Views)
There is a "StructPassing" example in the TestStand/examples folder. It shows how you can pass the struct to DLL function. Additionally, you can access the struct using TestStand API.

Yevgeny
0 Kudos
Message 2 of 2
(3,158 Views)