2 ipetrace interface, 1 ipetrace::getbuspacket, Parameters – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual
Page 52: Return values, Remarks, Example, Ipetrace* pe_trace, Ipetrace interface, Ipetrace::getbuspacket

Teledyne LeCroy
Automation API for PETracer/PETrainer
47
4.2 IPETrace interface
The IPETrace
interface is a primary dual interface for the
PETrace object.
 
This interface is derived from the ITrace interface. 
 
The IPETrace
interface implements all methods from the ITrace
interface plus the following:
GetBusPacket
4.2.1 IPETrace::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
PEPacket object interface
Return values
 
 
Remarks
PEPacket
object is created via this method call if the call was successful.
 
Example 
 
WSH: 
 
C++: 
 
IPETrace* pe_trace;
 
 
. . .
IDispatch* packet; 
try 
{ 
 packet = pe_trace->GetBusPacket( GetDlgItemInt(IDC_PACKET_NUMBER) ).Detach(); 
} 
catch ( _com_error& er) 
{ 
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("PETracer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("PETracer client"), MB_OK );
return 1;
} 
 
IPEPacket* custom_packet; 
HRESULT hr = packet->QueryInterface( IID_IPEPacket, (void**)&custom_packet ); 
packet->Release(); 
 
