Teledyne-lecroy SAS_SATA Automation API manual Uživatelský manuál Strana 144

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 150
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 143
TeledyneLeCroy SASAnalyzerObjectEvents
138 AutomationAPIforTeledyneLeCroySAS/SATAProtocolSuite
Example
VBScript:
<OBJECT
ID = Analyzer
CLASSID = " clsid: 297CD804-08F5-4A4F-B3BA-779B2654B27C
" >
</OBJECT>
<P ALIGN=LEFT ID=StatusText></P>
<SCRIPT LANGUAGE="VBScript">
<!--
Dim CurrentTrace
Sub Analyzer_OnTraceCreated(ByRef Trace)
On Error Resume Next
Set CurrentTrace = Trace
If Err.Number <> 0 Then
MsgBox Err.Number & ":" & Err.Description
End If
StatusText.innerText = "Trace '" &
CurrentTrace.GetName & "' created"
End Sub
-->
</SCRIPT>
C++:
HRESULT __stdcall OnTraceCreated( IDispatch* trace )
{
ISASTrace* sas_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_ISASTrace,
(void**)&sas_trace );
if (FAILED(hr))
{
_com_error er(hr);
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("SASTracer
client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("SASTracer
client"), MB_OK );
return hr;
}
. . .
return hr;
}
Zobrazit stránku 143

Komentáře k této Příručce

Žádné komentáře