次の方法で共有


ClientEventError routine

The ClientEventError routine is an event handler that the underlying TDI transport calls in response to an error, either in the transport itself or in a still lower network driver, that makes I/O on a particular local transport address unreliable or impossible.

Syntax

NTSTATUS ClientEventError(
  _In_ PVOID    TdiEventContext,
  _In_ NTSTATUS Status
);

Parameters

  • TdiEventContext [in]
    Pointer to the client-supplied context provided in the IRP that was set up with TdiBuildSetEventHandler when ClientEventError was registered with the underlying transport.

  • Status [in]
    Specifies an NTSTATUS value that provides information about the condition that caused this call to ClientEventError.

Return value

ClientEventError can return STATUS_SUCCESS.

Remarks

A call to ClientEventError notifies the local-node client of an error condition in the underlying TDI transport, in one of the lower protocol layers of the transport stack, or in the underlying NDIS NIC driver to which the transport stack is bound. If such an error occurs, the TDI transport calls all currently registered ClientEventError handlers for each client on every open address that depends on the underlying driver that encountered the error condition.

A call to ClientEventError can indicate a catastrophic failure. After such a call, the client should cease to use, and in some cases close, the file object representing the transport address associated with this notification. If this address is associated with an endpoint-to-endpoint connection, ClientEventError can assume the connection is broken as well.

Consequently, a ClientEventError handler usually cleans up any state it was maintaining for the address and for all connection endpoints it has associated with that address. That is, the client notifies higher level components for which it is handling pending operations on the address of the failure. Then, the client releases all resources it previously allocated that are relevant to those operations.

ClientEventError must be capable of carrying out its operations at IRQL = DISPATCH_LEVEL.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

Requirements

Target platform

Desktop

Header

Tdikrnl.h (include TdiKrnl.h)

IRQL

DISPATCH_LEVEL (see Remarks section)

See also

ClientEventErrorEx

TdiBuildSetEventHandler

 

 

Send comments about this topic to Microsoft