MgslOpenTraceHandle


Prototype  
ULONG MgslOpenTraceHandle( ULONG PortID,
                           PHANDLE phDevice );
Parameters  
PortID
Integer port identifier
phDevice
pointer to buffer to hold returned device handle
Return Value  
ERROR_SUCCESS (0)
trace handle to port successfully opened
ERROR_DEVICE_IN_USE
a trace handle to this port is already open
ERROR_BAD_DEVICE
port does not exist or is not functioning
ERROR_ACCESS_DENIED
insufficient privilege to open trace handle

Open a handle to an HDLC port for retrieving trace data. If an HDLC application uses tracing directly, then use the device handle returned by MgslOpen. This function is used by processes external to an HDLC application to get a special tracing handle. The trace utility that is part of the run time kit uses this call. This is necessary because only one normal device handle at a time can be open. Only one open tracing handle at a time is allowed. The tracing handle can be used with any HDLC API call that requires a device handle, but should be used only for tracing purposes.

Under Windows NT, the calling process must have administrative privilege to call this function.

See also: Opening the Port, Closing the Port


Previous Contents Next