12-17-2009 11:28 PM
i have a DLL written in C (CVI), how can i import the structures into TestStand's custom types?
some of these structs are huge.... Certainly there must a better way than having to create the custom types by hand and size every element one by one through GUI menus.
i'm doing that latter method, because it's the only way i've been able to get to work. But TestStand complains that the "parameters specified by the step do not match the function prototype"(with the flashing red (!) icon). I've been thru it a number of times, and the custom Type does indeed match the function prototype, so i don't know what the complaint is.
12-18-2009 02:49 AM
If your DLL includes the header information about the functions (so TestStand can extract the parameters on its own), you will have the possibility to create a data type using a "wizard".
If you do not have this information in TestStand, you have to build the custom data type manually (as you are currently doing).
If you have the data type configured (included all elements in the container), you have to configure it to accept C-structs. This can be done using the Properties dialog of the data type. In this dialog, switch to the C Struct Passing tab and enable the option "Allow Objects of This Type to be Passed as Structs" .
hope this helps,
Norbert
01-04-2010 09:53 AM
TestStand cannot obtain the layout of structs used by functions in DLLs so you have to manually create custom types to specify the layout.
The error (flashing red ! icon) you are seeing, however, is not related to the struct layout. I cannot tell you what the error is indicating without more information. Did you specify the C Struct Passing information for the custom type? Does the custom type name match the name of the struct?