TSPI_lineCloseCall

This function deallocates the call after completing or aborting all outstanding asynchronous operations on the call.

LONG TSPIAPI TSPI_lineCloseCall(
  HDRVCALL hdCall 
);

Parameters

  • hdCall
    Service provider's handle to the call to be closed. After the call is successfully closed, this handle is no longer valid. The call state can be any state.

Return Values

Returns zero if the function succeeds or an error number if an error occurs. The following table shows the return values for this function.

Value Description
LINEERR_NOMEM Not enough memory is available.
LINEERR_OPERATIONFAILED The operation failed.
LINEERR_OPERATIONUNAVAIL The operation is unavailable.
LINEERR_RESOURCEUNAVAIL The resource is unavailable.

Remarks

The service provider must report completion for asynchronous operations. If TSPI_lineCloseCall is called for a call on which there are outstanding asynchronous operations, the operations should be reported complete with an appropriate result or error code before this procedure returns. After this procedure returns, the service provider must report no further events on the call. The service provider's handles for the line and calls on the line become "invalid."

TAPI does not call TSPI_lineCloseCall if a service provider synchronously returns an error from a call to the TSPI_lineMakeCall function. But TAPI does call TSPI_lineCloseCall if the service provider returns an error from the asynchronous operation initiated by TSPI_lineMakeCall.

If there is an active call on the line at the time of TSPI_lineCloseCall, the call must be dropped if this behavior is indicated by the LINEDEVCAPFLAGS_CLOSEDROP bit in the LINEDEVCAPS structure.

If the service provider can determine that there is another agent sharing control of the call, such as in a party line situation with a separate handset, the service provider simply lets control of the call pass to the other agent rather than forcibly dropping it.

This function should always succeed except in extraordinary circumstances. Most callers will probably ignore the return code because they will be unable to compensate for any error that occurs. The specified return values are more advisory for development diagnostic purposes than anything else.

This function is called when the last application with a handle to this call executes the lineDeallocateCall function.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.

See Also

TSPI_lineMakeCall

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.