Isastrace::getbuspacket – Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 85

Advertising
background image

 

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

79

SASTrace Object

Teledyne LeCroy

ISASTrace::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 

SASPacket Object

 interface

Return Value

Remarks

The SASPacket object is created by this method call, if the call was successful. 

Example

WSH:

C++:
ISASTrace* 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("SASTracer

client"), MB_OK );

else
::MessageBox( NULL, er.ErrorMessage(),_T("SASTracer

client"), MB_OK );

return 1;
}
ISASPacket* custom_packet;
HRESULT hr =
packet->QueryInterface(IID_ISASPacket,

(void**)&custom_packet);

packet->Release();

Advertising