TSPI_lineClose

This function closes the specified open line device after completing or aborting all outstanding calls and asynchronous operations on the device.

LONG TSPIAPI TSPI_lineClose(
  HDRVLINE hdLine 
);

Parameters

  • hdLine
    Service provider's handle to the line to be closed. After the line is successfully closed, this handle is no longer valid.

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 method.

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 every asynchronous operation. If TSPI_lineClose is called for a line on which there are outstanding asynchronous operations, the operations are reported complete with an appropriate result or error code before this procedure returns.

A similar requirement exists for active calls on the line. Outstanding operations must be reported complete with appropriate result or error codes. Active calls must also be dropped, if required, and if this behavior was indicated by the LINEDEVCAPFLAGS_CLOSEDROP bit in the LINEDEVCAPS structure.

After this procedure returns, the service provider must report no further htCall on the line or calls that were on the line. The service provider's handles for the line and calls on the line become "invalid."

The service provider must relinquish nonsharable resources it reserves while the line is open. For example, closing a line accessed through a COM port and modem should result in closing the COM port, making it once again available for use by other applications.

The service provider does not issue the LINE_LINEDEVSTATE message in response to this function invocation because the line closes and there is no longer any interest in its state changes.

Requirements

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

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.