Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

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 Value

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_lineCloseis 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 LINEDEVCAPSstructure.

After this procedure returns, the service provider must report no further htCallon 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

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