NdisDeregisterAdapter

NDIS_STATUS
    NdisDeregisterAdapter(
        IN NDIS_HANDLE  NdisAdapterHandle
        );

NdisDeregisterAdapter is called by the NIC driver to complete network interface card removal.

Parameters

NdisAdapterHandle
Specifies the handle that the NDIS interface library associates with the network interface card.

Return Value

NdisDeregisterAdapter can return the following status codes:

NDIS_STATUS_FAILURE
NDIS_STATUS_NOT_ACCEPTED
NDIS_STATUS_PENDING
NDIS_STATUS_SUCCESS

Comments

Drivers usually call NdisDeregisterAdapter when they are unloading. This function terminates the registration of the network interface card with the NDIS interface library and frees all the resources that were allocated when the NIC driver called NdisRegisterAdapter.

Before a driver calls this function, it must call NdisFreeMemory to free all storage associated with the network interface card.

Callers of NdisDeregisterAdapter run at IRQL PASSIVE_LEVEL. 

See Also

MacRemoveAdapter, NdisFreeMemory, NdisRegisterAdapter