Hi,
Is this the sort of thing you are doing in your C code:
void __declspec(dllexport) __stdcall demoError(CAObjHandle seqContextCVI,
char reportText[1024], short *errorOccurred, long *errorCode, char errorMsg[1024])
{
ViSession rm;
ViSession handle;
int error = 0;
ErrMsg errMsg = {'\0'};
ERRORINFO errorInfo;
// char *lastUserName = NULL;
// INSERT YOUR SPECIFIC TEST CODE HERE
// The following code shows how to access a property or variable via the TestStand ActiveX API
// tsErrChk (TS_PropertyGetValString(seqContextCVI, &errorInfo,
// "StationGlobals.TS.LastUserName",
// 0, &lastUserName));
tsErrChk(viOpenDefaultRM (&rm));
tsErrChk(viOpen (rm, "GPIB::1::0::INSTR", VI_NULL, VI_NULL, &handle));
Error:
// FREE RESOURCES
// if (lastUserName != NULL)
// CA_FreeMemory(lastUserName);
// If an error occurred, set the error flag to cause a run-time error in TestStand.
if (error < 0)
{
*errorOccurred = TRUE;
viStatusDesc (handle, error, errMsg);
// OPTIONALLY SET THE ERROR CODE AND STRING
*errorCode = error;
strcpy(errorMsg, errMsg);
}
}
Or are you using the TestStand version 2.0 prototype?
Regards
Ray Farmer
Regards
Ray Farmer
