[Problem] Can't get TS_EngineCommitGlobalsToDisk to work (TestStand 3.5)...

I CVI DLL function that displays a Panel for the operator values entered.  I then store in a StationGlobal structure.  It seems that the actual ini file is not updated unless complete you the sequence.  If end, he does she not get the latest version of the memory of the StationGlobals.  I found the function TS_EngineCommitGlobalsToDisk and added the following works for my DLL so I call after the Panel closed:

void CommitInformation (int promptOnSaveConflicts,
CAObjHandle seqContextCVI,
char * reportText;
short * errorOccurred.
long * errorCode,.
Char errorMsg [1024])
{
error int = 0;
ERRORINFO errorInfo.
ErrMsg errMsg = {'\0'};
 
tsErrChk (TS_EngineCommitGlobalsToDisk (seqContextCVI & errorInfo, promptOnSaveConflicts (VBOOL)));
 
Error:
If an error occurs, set the error indicator causes an error of execution at TestStand.
If (errorInfo.wCode<>
{
* errorOccurred = TRUE;
* error code = errorInfo.wCode;
sprintf (errorMsg,
"Source: %s\n"
"Description: %s\n"
errorInfo.source,
errorInfo.description);
}
}

Now, when you run 'error' contains a considerable number of negative, but errorInfo does contain no errors.  Also, the StationGlobals are not saved.  What I am doing wrong?

The fixed.  Kind of off the coast.  I removed the feature from the CVI DLL and used a step of the ActiveX/COM in TestStand and called the CommitGlobalsToDisk from there!

Tags: NI Software

Similar Questions

Maybe you are looking for