beautypg.com

2 ivscriptengine::tag, Parameters, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 123: Remarks, Example, Ipetrace* pe_trace, Ipeverificationscript* pe_vscript = null, Ivscriptengine::tag

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

118

9.1.2 IVScriptEngine::Tag


[propget] HRESULT Tag( [out, retval] int* pVal )

[propput] HRESULT Tag( [in] int newVal )

Property assigning and getting a tag to the VSE object. This tag is used in event notifications allowing a client
event handler to determine which VSE object sent the event.

Parameters

pVal

Address of the variable where the current VSE tag is kept

newVal

New tag for VSE

Return values


Remarks


Example

C++:

// In this example we use wrapper functions provided by #import directive
//

IPETrace* pe_trace;


. . .


IPEVerificationScript* pe_vscript = NULL;

pe_trace->QueryInterface( IID_IPEVerificationScript, (void**)&pe_vscript ) )

assert( pe_vscript != NULL );

IVScriptEngine* pe_vsengine = NULL;
pe_vsengine = pe_vscript -> GetVScriptEngine("Test_1");
assert( pe_vsengine != NULL );

pe_vsengine ->PutTag( 0xDDAADDAA );
assert( pe_vsengine -> GetTag() == 0xDDAADDAA );


VS_RESULT result = pe_vsengine ->RunVScript();
if( result == PASSED )
{
::MessageBox( NULL, "Test 1 passed !!!", "PETracer client", MB_OK );
}


. . .