Using Lab Windows CVI5.5 And TestStand
Creating dll in CVI and passing in RunState.Engine from teststand to the CVI routine. The handle works fine to to access the sequence file name through the call:
TS_EngineGetSeqFile (objectHandle, &errorInfo, szSeqPath, 0, &seqFile);
I'm trying to use the same engine state context handle to access the teststand global variables.
int CVIFUNC SequenceCalculateCRC (CAObjHandle objectHandle, char szSeqPath[],
char szLimitsPath[], char szSupportPath[],
unsigned long *sw_checksum,
unsigned long *test_checksum, char szError[])
{
int error = 0;
ERRORINFO errorInfo = {0,0,'\0','\0','\0',0,0};
char * pszKeyName;
CAObjHandle GlobalsHandle;
error = TS_EngineGetProperty (objectHandle, &errorInfo,
TS_EngineGlobals, CAVT_OBJHANDLE,
GlobalsHandle);
error = TS_PropertyGetValString(GlobalsHandle, &errorInfo,
"StationGlobals.SequenceFamily.Family", 0,&pszKeyName);
return 0;
}
***This compiles to an error ***
196, 60 Type error in argument 5 to `TS_EngineGetProperty'; found 'CAObjHandle'
expected 'pointer to void'.
If I force around by casting GlobalsHandle to a (void *) it will compile, but then the
TS_PropertyGetValString function results in an error of
0x80070006 "Invalid handle"
Does anybody have an example of how TS_EngineGetProperty should be used?