次の方法で共有


ClientPnPDelNetAddress routine

The ClientPnPDelNetAddress routine is called by TDI as a consequence of a transport's call to TdiDeregisterNetAddress.

Syntax

VOID ClientPnPDelNetAddress(
  _In_ PTA_ADDRESS      Address,
  _In_ PUNICODE_STRING  DeviceName,
  _In_ PTDI_PNP_CONTEXT Context
);

Parameters

  • Address [in]
    Pointer to a buffered network address. The contents and layout of this buffer are protocol-specific in nature with the information supplied at Address depending on the AddressType and AddressLength members as set by the underlying transport.

  • DeviceName [in]
    Pointer to a buffered Unicode string, which effectively identifies the transport from which the given network address is being deregistered. Typically, this contains the name of the transport-created device object originally passed in to the ClientPnPBindingChange routine when the client was offered this binding.

  • Context [in]
    Pointer to a transport-supplied context associated with this address.

    For example, TCP/IP passes a pointer to the PDO representing the device on which the connection to the given address has just been broken.

Return value

None

Remarks

A client must register its ClientPnPDelNetAddress routine with a call to TdiRegisterPnPHandlers to begin receiving these notifications whenever any PnP-supporting transport is about to delete an existing net address.

Subsequent to the sequence of initialization-time calls to ClientPnPAddNetAddress, TDI calls ClientPnPDelNetAddress whenever a PnP-supporting transport deregisters a network address with TDI. That is, ClientPnPDelNetAddress can be called with an address supplied by any transport, even a transport to which it is not bound. Consequently, ClientPnPDelNetAddress should return control promptly if the client does not recognize the protocol-specific type of the input address. For better client performance, a check on the AddressType member of the TA_ADDRESS structure is more efficient than doing a string comparison on the buffered contents at DeviceName.

The format and contents of the buffer at Address depend on the value of the AddressType member in the TA_ADDRESS structure. The underlying transport is responsible for providing only the specification of the network address. If the TA_ADDRESS structure of a particular type also contains a Socket identifier or any other such collateral member(s), those member(s) should be ignored by ClientPnPDelNetAddress.

For the input Context parameter, the value of the ContextType member in the TDI_PNP_CONTEXT structure provides a hint about how to interpret this transport-supplied and protocol-determined context information. The Context pointer can be NULL if the underlying transport does not provide context information when it calls TdiDeregisterNetAddress.

In conjunction with ClientPnPAddNetAddress, ClientPnPDelNetAddress maintains the client's internal list(s) of per-binding valid network addresses. When ClientPnPDelNetAddress is called to remove an address from such an internal list, it also notifies any of its own clients that might be using the address of the just-broken network connection.

A reciprocal call to TdiDeregisterPnPHandlers disables calls to ClientPnPDelNetAddress.

TDI calls ClientPnPDelNetAddress 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

ClientPnPAddNetAddress

TA_ADDRESS

TdiDeregisterNetAddress

TdiDeregisterPnPHandlers

 

 

Send comments about this topic to Microsoft