다음을 통해 공유


ProtocolUninstall (Compact 2013)

3/26/2014

NDIS calls a protocol driver's ProtocolUninstall function to perform cleanup operations before a protocol driver is uninstalled.

Syntax

VOID
  ProtocolUninstall(
    VOID
    );

Parameters

None

Return Value

None

Remarks

The ProtocolUninstall function is optional. The protocol driver registered an entry point, if any, for this function in the NDIS_PROTOCOL_DRIVER_CHARACTERISTICS structure that it passed to the NdisRegisterProtocolDriver function.

In response to a user request to uninstall a protocol driver, NDIS calls a protocol driver's ProtocolUninstall function. NDIS calls ProtocolUninstall after calling the protocol driver's ProtocolUnbindAdapterEx function once for each bound adapter.

ProtocolUninstall performs driver-determined cleanup operations. For example, ProtocolUninstall could request clients to close open handles to device objects that the protocol driver exported. Until all such handles are closed, the I/O manager will not call the Unload routine that the protocol driver registered in the driver object that is passed to its DriverEntry routine. After all the handles are closed, ProtocolUninstall can delete any device objects that are created by the protocol driver.

The protocol lower edge of an intermediate driver might require a ProtocolUninstall function. The intermediate driver can release its protocol edge resources in ProtocolUninstall before NDIS calls its MiniportDriverUnload function.

NDIS calls ProtocolUninstall at IRQL = PASSIVE_LEVEL.

See Also

Reference

NDIS Protocol Driver Functions
DriverEntry
MiniportDriverUnload
ProtocolUnbindAdapterEx
NDIS_PROTOCOL_DRIVER_CHARACTERISTICS
NdisRegisterProtocolDriver