When all NIC bindings have been closed, the NDIS interface library initiates removal of the associated network interface card, as Figure A.3.11 shows. To accomplish this task, the library calls MacRemoveAdapter in the NIC driver. During the network interface card removal operation, the driver removes associated resources by calling NdisRemoveInterrupt and rejects all incoming requests with NDIS_STATUS_ADAPTER_REMOVED. After resource removal, the driver calls NdisDeregisterAdapter, through which the NDIS interface library informs the operating system that the network interface card has been removed. For more information about closing NIC bindings, see Section A.3.9.
If the NDIS interface library has removed all network interface cards for a particular NIC driver, it can unload and deregister the driver. For more information about this operation, see Section A.3.12.
Figure A.3.11 Removing a Network Interface Card