
TeledyneLeCroy SASVScriptEngineObject
122 AutomationAPIforTeledyneLeCroySAS/SATAProtocolSuite
IVScriptEngine::GetScriptVar
HRESULT GetScriptVar (
[in] BSTR var_name,
[out, retval] VARIANT* var_value )
Changesthecurrentverificationscriptnameandrunstheverificationscript.
Parameters
var_name Stringprovidingthenameoftheglobalvariableorconstantused
intherunningverificationscript
var_value AddressofaVARIANTvariablewheretheresultwillbekept
ReturnValue
E_PENDING Ifthismethodiscalledwhenthescriptis alreadyrunning
Remarks
Ifthereisnosuchglobalvariableorconstantwiththenamevar_name,theresulting
valuewillcontainanemptyVARIANT .
Example
C++:
// This example uses wrapper functions provided by the
#import directive.
ISASTrace* sas_trace;
. . .
ISASVerificationScript* sas_vscript = NULL;
sas_trace->QueryInterface( IID_ISASVerificationScript,
(void**)&sas_vscript ) )
assert( sas_vscript != NULL );
IVScriptEngine* sas_vsengine = NULL;
sas_vsengine = sas_vscript ->
GetVScriptEngine("Test_1");
assert( sas_vsengine != NULL );
VS_RESULT result = sas_vsengine ->RunVScript();
. . .
VARIANT my_var;
VariantInit( &my_var );
Komentarze do niniejszej Instrukcji