10-20-2005 12:40 AM
Consider the following example in CVI 7.0:
#include <cvidef.h>
typedef struct
{
int t_err;
unsigned int err_flags;
int err_code;
char err_msg[1024];
} TEST_ERROR;
int DLLEXPORT DLLSTDCALL NfctConnect (int iPortType, int iComPort, int iBaudRate, TEST_ERROR * tstError);
I want to call this function from TestStand 3.1 using the CVI Standard Adapter.
I created a function panel from the header file then I generated a DLL that contains the type library as an embedded resource. Using OLE/COM object viewer I can confirm that the definitions are correct. In TestStand however, all basic types are recognized but the structure is rejected as not being a TestStand type.
However, a C structure is supposed to be assimilated as a container in TestStand. Do I have to manually create a custom data type in TestStand to match my C structure or TestStand can automatically create the container based on the information in the type library (because this information is available it won't be difficult for TestStand to do this automatically)?
10-20-2005 03:56 PM