TDI_STATUS
ClientEventDisconnect (
IN PVOID TdiEventContext,
IN CONNECTION_CONTEXT ConnectionContext,
IN INT DisconnectDataLength,
IN PVOID DisconnectData,
IN INT DisconnectInformationLength,
IN PVOID DisconnectInformation,
IN ULONG DisconnectFlags
);
ClientEventDisconnect is a routine the TDI driver calls in response to a TDI_EVENT_DISCONNECT event. It notifies the local node client that the remote node client is closing a connection. The disconnect can be either controlled or uncontrolled. ClientEventDisconnect must be the last event handler the TDI driver calls on a connection.
When the TDI driver calls ClientEventDisconnect, it does not imply to the local node client that the connection endpoint is closed. It merely notifies the client that connection activity has ceased or is ceasing. Because the connection endpoint is still valid, the local node client can reuse it in another operation.
Parameters
TdiEventContext
Points to the context the client specifies in an IRP when it issues the TDI_SET_EVENT_HANDLER request message to register ClientEventDisconnect.
ConnectionContext
Specifies the context the client associates with the connection endpoint identifier.
DisconnectDataLength
Specifies the length, in bytes, of disconnect data that DisconnectData indicates. A length of 0 specifies no disconnect data.
DisconnectData
Points to a buffer containing disconnect data the TDI driver receives from the remote node client.
DisconnectInformationLength
Specifies the length, in bytes, of the buffer that DisconnectInformation indicates. A value of 0 specifies no additional disconnect information.
DisconnectInformation
Points to a buffer containing additional driver-specified disconnect information.
DisconnectFlags
Specifies options associated with the disconnect. The following options are available in the form of bit flags. For definitions of these options, see TDI_DISCONNECT.
TDI_DISCONNECT_RELEASE
TDI_DISCONNECT_ABORT
Return Value
ClientEventDisconnect can return the following TDI status code:
STATUS_SUCCESS
For more information about status codes, see Part II, Chapter 10.
See Also