Manual

67
FireInspector Automation User’s Manual
CATC Version 1.0
2.7.2 IAnalyzerEvents::OnTraceCreated
Fired when trace is created; this event is a result of IAnalyzer::StartRecording/
IAnalyzer::StopRecording method call.
Syntax
HRESULT OnTraceCreated (
[in] IDispatch* trace );
Parameters
traceaddress of a pointer to the FwTrace object primary interface
Return values
Remarks
Make sure the event handlers have
_stdcall calling convention.
Example
VBScript:
<OBJECT
ID = Analyzer
CLASSID = "clsid:0B179BC1-DC61-11D4-9B71-000102566088" >
</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 )
{
IFwTrace* fw_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_IFwTrace,
(void**)&fw_trace );
if (FAILED(hr))
{
_com_error er(hr);
if (er.Description().length() > 0)