Compartir a través de


TdiDeregisterProvider function

The TdiDeregisterProvider function is the reciprocal of TdiRegisterProvider. PnP-supporting transports call TdiDeregisterProvider when they are being unloaded.

Syntax

NTSTATUS TdiDeregisterProvider(
  _In_ HANDLE ProviderHandle
);

Parameters

  • ProviderHandle [in]
    Specifies the handle obtained from TdiRegisterProvider.

Return value

TdiDeregisterProvider returns STATUS_SUCCESS if the registration was released and all the clients of that transport were notified. Otherwise, it can return STATUS_INSUFFICIENT_RESOURCES, although it is highly unlikely to ever return this status to a transport that is currently unloading itself.

Remarks

Before a transport returns control from its Unload routine, it must call TdiDeregisterProvider if it made an initialization-time call to TdiRegisterProvider.

The transport must free all the TDI-associated resources it has allocated before it calls TdiDeregisterProvider. In general, the transport has already called TdiDeregisterAddress with any network addresses and TdiDeregisterDeviceObject with any per-binding device objects that it registered with TDI when it tore down its bindings to the underlying NICs. However, an unloading transport also should destroy the device objects it created with IoDeleteDevice and release any collateral resources it allocated to maintain state about its TDI clients before calling TdiDeregisterProvider. (For more information, see IoDeleteDevice.)

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

TdiProviderReady

TdiRegisterProvider

 

 

Send comments about this topic to Microsoft