Поделиться через


ProtocolCmCloseCall (NDIS 5.1) function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

The ProtocolCmCloseCall function is a required function that terminates an existing call and releases any resources that the call manager allocated for the call.

Syntax

NDIS_STATUS ProtocolCmCloseCall(
  _In_     NDIS_HANDLE CallMgrVcContext,
  _In_opt_ NDIS_HANDLE CallMgrPartyContext,
  _In_opt_ PVOID       CloseData,
  _In_opt_ UINT        Size
);

Parameters

  • CallMgrVcContext [in]
    Specifies the handle to a call manager-allocated context area in which the call manager maintains its per-VC state. This handle was provided to NDIS from the call managers ProtocolCmMakeCall function.

  • CallMgrPartyContext [in, optional]
    Specifies the handle, if any, to a call manager-allocated context area in which the call manager maintain information about a party on a multipoint VC. This handle is NULL if the call being closed is not a multipoint call.

  • CloseData [in, optional]
    Pointer to a buffer containing connection-oriented client-specified data that should be sent across the connection before the call is terminated. This parameter is NULL if the underlying network medium does not support transfers of data when closing a connection.

  • Size [in, optional]
    Specifies the length, in bytes, of the buffer at CloseData, zero if CloseData is NULL.

Return value

ProtocolCmCloseCall returns the status of its operation(s) as one of the following:

Return code Description
NDIS_STATUS_SUCCESS

Indicates that the call manager successfully terminated the call.

NDIS_STATUS_PENDING

Indicates that the call manager will complete the request to terminate the call asynchronously. When the call manager has completed all operations required to terminate the connection, it must then call NdisCmCloseCallComplete to signal NDIS that the call has been closed.

NDIS_STATUS_INVALID_DATA

Indicates that CloseData was specified, but the underlying network medium does not support sending data concurrent with terminating a call.

NDIS_STATUS_XXX

Indicates that the call manager could not terminate the call. The actual error returned can be a status propagated from another NDIS library routine.

 

Remarks

ProtocolCmCloseCall communicated with network control devices or other media-specific actors, as necessitated by its media, to terminate a connection between the local node and a remote node. If the call manager is required to communicate with network control devices (such as a networking switch) it should use a virtual connection to the network control device that it established in its ProtocolBindAdapter function. Stand-alone call managers communicate to such network devices by calling NdisCoSendPackets. Miniport drivers with integrated call-management support never call NdisCoSendPackets. Instead, they transmit the data directly across the network.

If CloseData is non-NULL and sending data at connection termination is supported by the media that this call manager handles, the call manager should transmit the data specified at CloseData to the remote node before completing the call termination. If sending data concurrent with a connection being terminated is not supported, call managers should return NDIS_STATUS_INVALID_DATA.

If ProtocolCmCloseCall is passed an explicit CallMgrPartyContext, then the call being terminated is a multipoint VC, and the call manager must perform any necessary network communication with its networking hardware, as appropriate to its media type, to terminate the call as a multipoint call. The call manager must also free the memory that it allocated earlier, in ProtocolCmMakeCall, for its per-party state that is pointed to by CallMgrPartyContext. Failure to properly release, deallocate, or otherwise deactivate those resources causes a memory leak.

After the call has been terminated with the network, any close data has been sent, and any resources at CallMgrPartyContext have been freed, the call manager must call NdisCmDeactivateVc. This notifies NDIS and the underlying miniport driver, if any, to expect no further transfers on the given VC.

Requirements

Target platform

Desktop

Version

See ProtocolCmCloseCall.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

NdisClMakeCall

NdisCmDeactivateVc

NdisCoSendPackets

ProtocolCmMakeCall

 

 

Send comments about this topic to Microsoft