NdisDeregisterProtocolDriver function

A protocol driver calls the NdisDeregisterProtocolDriver function to release the resources that NDIS allocated when the driver called the NdisRegisterProtocolDriver function.

Syntax


VOID NdisDeregisterProtocolDriver(
  _In_ NDIS_HANDLE NdisProtocolHandle
);

Parameters

NdisProtocolHandle [in]

The handle returned by the NdisRegisterProtocolDriver function.

Return value

None

Remarks

Registered protocol drivers typically call NdisDeregisterProtocolDriver when the driver's Unload routine has been called or after errors occur in the DriverEntry routine. Protocol drivers must not call NdisDeregisterProtocolDriver from any entry point that NDIS calls. Calling NdisDeregisterProtocolDriver from such an entry point could cause a deadlock.

If a protocol driver has open bindings, its call to NdisDeregisterProtocolDriver causes NDIS to call the protocol driver's ProtocolUnbindAdapterEx function once for each open binding. NDIS calls ProtocolUnbindAdapterEx within the context of the NdisDeregisterProtocolDriver call.

After any outstanding bindings have been closed, NdisDeregisterProtocolDriver releases all of the resources that NDIS allocated to track bindings and filters for the protocol driver.

Requirements

Target platform

Universal

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

DDI compliance rules

Irql_Protocol_Driver_Function

See also

DriverEntry
NdisRegisterProtocolDriver
ProtocolUnbindAdapterEx
Unload

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft