MgslGetTraceEvent
| Prototype |
|
ULONG MgslGetTraceEvent( HANDLE hDevice,
PMGSL_TRACE_EVENT pTraceEvent,
LPOVERLAPPED pOverlapped );
|
| Parameters |
|
hDevice
|
handle to open port |
pTraceEvent
|
pointer to buffer to hold returned trace event |
pOverlapped
|
pointer to overlapped structure initialized with a
WIN32 manual reset event object which will be signaled when the
request completes |
| Return Value |
|
ERROR_SUCCESS (0)
|
trace event returned |
ERROR_INVALID_HANDLE
|
hDevice is invalid |
ERROR_INVALID_PARAMETER
|
pTraceEvent is invalid. |
ERROR_BUSY
|
a request of this type is already pending |
ERROR_IO_PENDING
|
waiting for trace data to become available |
Return a trace event in the MGSL_TRACE_EVENT
structure specified by pTraceEvent. The call returns ERROR_IO_PENDING if
no trace events are immediately available. When a trace event becomes
available, the API copies the trace event to pTraceEvent and signals the
event object in the OVERLAPPED structure. Only one request of this type
can be pending. Call MgslCancelGetTraceEvent to
cancel a pending MgslGetTraceEvent call. A canceled call returns a
special event with EventType_None to indicate
no actual event was returned.
| NOTE: |
If MgslGetTraceEvent, returns ERROR_IO_PENDING, it
is important that MgslGetTraceEvent not be called again, until
the request completes. See the Caution note in the
Asynchronous API Notification topic for more information. |
See also: Tracing, Asynchronous API Notification