NdisCloseAdapter

This function releases the binding established and the resources allocated when the protocol called the NdisOpenAdapter function.

At a Glance

Header file: Ndis.h
Windows CE versions: 2.0 and later

Syntax

VOID NdisCloseAdapter( OUT PNDIS_STATUS Status,
IN NDIS_HANDLE
NdisBindingHandle );

Parameters

Status
Pointer to a caller-supplied variable in which this function returns the status of the close operation; one of the following:
NDIS_STATUS_SUCCESS
The binding is closed, and all resources pertaining to that binding have been released.
NDIS_STATUS_PENDING
A close-adapter request is being handled asynchronously, and the caller’s ProtocolCloseAdapterComplete function will be called when the close operation is done.
NdisBindingHandle
Handle returned by NdisOpenAdapter that identifies the virtual adapter or NIC to be closed.

Remarks

The Windows CE version of NdisDeregisterProtocol frees resources associated with the protocol. It does not close any outstanding bindings or call any adapter-specific ProtocolCloseAdapterComplete or ProtocolStatus functions. Unlike the Windows NT version, it does not unload the Miniport driver when there are no more protocol drivers, also known as protocol stacks, bound to it.

As soon as a protocol calls this function, the handle at NdisBindingHandle should be considered invalid by the caller.

A driver that calls this function runs at IRQL PASSIVE_LEVEL.

See Also

NdisOpenAdapter