PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE callback function (ndis.h)

The ProtocolCmNotifyCloseAfComplete function indicates that a client has completed the closing of an address family (AF) that a stand-alone call manager or miniport call manager (MCM) started by calling the NdisCmNotifyCloseAddressFamily or NdisMCmNotifyCloseAddressFamily function, respectively.

Note  You must declare the function by using the PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE type. For more information, see the following Examples section.
 

Syntax

PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE ProtocolCmNotifyCloseAfComplete;

void ProtocolCmNotifyCloseAfComplete(
  [in] NDIS_HANDLE CallMgrAfContext,
  [in] NDIS_STATUS Status
)
{...}

Parameters

[in] CallMgrAfContext

A handle to the call manager's AF context area that the call manager supplied to NDIS in the ProtocolCmOpenAf function.

[in] Status

The clients final status for the AF close notification. Status can be one of the following:

NDIS_STATUS_SUCCESS

The client successfully closed its address family.

NDIS_STATUS_XXX

The client failed the request for some driver-determined reason.

Return value

None

Remarks

The ProtocolCmNotifyCloseAfComplete function is required for CoNDIS call managers.

If a stand-alone call manager will unbind from an underlying miniport adapter, the call manager must call the NdisCmNotifyCloseAddressFamily function before unbinding. When a miniport call manager (MCM) halts a miniport adapter, the MCM must call the NdisMCmNotifyCloseAddressFamily function.

If NdisCmNotifyCloseAddressFamily or NdisMCmNotifyCloseAddressFamily returns NDIS_STATUS_PENDING, NDIS calls ProtocolCmNotifyCloseAfComplete after the client completes the AF close operation.

NDIS calls ProtocolCmNotifyCloseAfComplete at IRQL <= DISPATCH_LEVEL.

Examples

To define a ProtocolCmNotifyCloseAfComplete function, you must first provide a function declaration that identifies the type of function you're defining. Windows provides a set of function types for drivers. Declaring a function using the function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.

For example, to define a ProtocolCmNotifyCloseAfComplete function that is named "MyCmNotifyCloseAfComplete", use the PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE type as shown in this code example:

PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE MyCmNotifyCloseAfComplete;

Then, implement your function as follows:

_Use_decl_annotations_
VOID
 MyCmNotifyCloseAfComplete(
    NDIS_HANDLE  CallMgrAfContext,
    NDIS_STATUS  Status
    )
  {...}

The PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE function type is defined in the Ndis.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the PROTOCOL_CM_NOTIFY_CLOSE_AF_COMPLETE function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.

For information about Use_decl_annotations, see Annotating Function Behavior.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Windows
Header ndis.h (include Ndis.h)
IRQL <= DISPATCH_LEVEL

See also

NdisCmNotifyCloseAddressFamily NdisMCmNotifyCloseAddressFamily

ProtocolCmOpenAf