다음을 통해 공유


TSPI_lineClose (Windows Embedded CE 6.0)

1/6/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_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

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

See Also

Reference

TSPI Line Device Functions