Share via


TSPI_lineCloseCall (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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 Value

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

Header tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

TSPI Line Device Functions
TSPI_lineMakeCall