2 ifctrace interface, 1 ifctrace::getbuspacket – Teledyne LeCroy SierraFC Automation API User Manual
Page 39

LeCroy Corporation
SierraFC M8-4 API Reference Manual
Manual Version 1.00
39
4.2 IFCTrace Interface
The IFCTrace interface is a primary dual interface for the FCTrace object.
This interface is derived from the ITrace interface.
The IFCTrace interface implements all methods from the ITrace interface plus the
following: GetBusPacket
4.2.1 IFCTrace::GetBusPacket
HRESULT GetBusPacket (
[in] long packet_number,
[out, retval] IDispatch** packet )
Retrieves the interface for a packet within a trace.
Parameters
packet_number
Zero based number of packet to retrieve
packet
Address of a pointer to the
object interface
Return values
Remarks
The FCPacket object is created by this method call, if the call was successful.
Example
WSH:
C++:
IFCTrace* sas_trace;
. . .
IDispatch* packet;
try
{
packet = sas_trace->GetBusPacket( GetDlgItemInt(IDC_PACKET_NUMBER)
).Detach();
}
catch ( _com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("SierraFC M8-4 client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("SierraFC M8-4 client"), MB_OK );
return 1;
}
IFCPacket* custom_packet;
HRESULT hr = packet->QueryInterface( IID_IFCPacket, (void**)&custom_packet );
packet->Release();