A protocol driver calls the NdisDeregisterProtocolDriver function to release the resources that NDIS allocated when the driver called the NdisRegisterProtocolDriver function.
void NdisDeregisterProtocolDriver( NDIS_HANDLE NdisProtocolHandle );
The handle returned by the NdisRegisterProtocolDriver function.
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.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Protocol_Driver_Function|