Share via


TdiDeregisterPnPHandlers function

The TdiDeregisterPnPHandlers function is the reciprocal of TdiRegisterPnPHandlers. It disables further PnP and power-state notifications to a set of ClientPnPXxx previously registered on a particular transport-to-NIC binding.

Syntax

NTSTATUS TdiDeregisterPnPHandlers(
  _In_ HANDLE BindingHandle
);

Parameters

  • BindingHandle [in]
    Specifies the handle returned by the client's preceding call to TdiRegisterPnPHandlers.

Return value

TdiDeregisterPnPHandlers returns STATUS_SUCCESS if the registration was released. Otherwise, it can return either of the following:

Return code Description
STATUS_INSUFFICIENT_RESOURCES

TDI could not allocate the resources it needed to complete this request at this time. Because the availability of system resources is dynamic, a subsequent call from the same client can succeed.

STATUS_NETWORK_BUSY

TDI failed the call to prevent a potential deadlock because a ClientPnPXxx routine is currently running. A subsequent call from the same client can succeed.

 

Remarks

A successful call to TdiDeregisterPnPHandlers stops further PnP/power, bind, unbind, and net-address-change notifications from being sent as calls to the ClientPnPXxx routines that were previously registered with TdiRegisterPnPHandlers on a particular transport-to-NIC binding.

When TdiDeregisterPnPHandlers returns STATUS_SUCCESS, the caller should release any resources that it allocated to maintain state for the given binding. For example, the client should release any memory it allocated to maintain per-binding state and all other per-binding resources that it allocated, such as its internal list for currently registered network addresses on this binding that were maintained by its ClientPnPAddNetAddress and ClientPnPDelNetAddress routines.

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

Universal

Header

Tdikrnl.h (include TdiKrnl.h)

Library

Tdi.lib

IRQL

< DISPATCH_LEVEL

See also

ClientPnPAddNetAddress

ClientPnPBindingChange

ClientPnPDelNetAddress

ClientPnPPowerChange

TdiRegisterPnPHandlers

 

 

Send comments about this topic to Microsoft