NdisDeregisterProtocolDriver function (ndis.h)

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

[in] NdisProtocolHandle

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

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Protocol_Driver_Function(ndis)

See also

DriverEntry

NdisRegisterProtocolDriver

ProtocolUnbindAdapterEx

Unload