TSPI_lineOpen

The TSPI_lineOpen function opens the line device whose device identifier is given, returning the service provider's handle for the device. The service provider must retain the TAPI handle for the device for use in subsequent calls to the LINEEVENT callback procedure.

LONG TSPIAPI TSPI_lineOpen(
DWORD dwDeviceID,     
HTAPILINE htLine,     
LPHDRVLINE lphdLine,  
DWORD dwTSPIVersion,  
LINEEVENT lpfnEventProc );

Parameters

  • dwDeviceID
    Identifies the line device to be opened.
  • htLine
    The TAPI handle for the line device to be used in subsequent calls to the LINEEVENT callback procedure to identify the device.
  • lphdLine
    A pointer to an HDRVLINE where the service provider fills in its handle for the line device.
  • dwTSPIVersion
    The TSPI version.
  • lpfnEventProc
    A pointer to the LINEEVENT callback procedure supplied by TAPI that the service provider calls to report subsequent events on the line.

Return Values

Returns zero if the function succeeds, or an error number if an error occurs. Possible return values are as follows:

LINEERR_ALLOCATED, LINEERR_OPERATIONUNAVAIL, LINEERR_NODRIVER, LINEERR_OPERATIONFAILED, LINEERR_NOMEM, LINEERR_RESOURCEUNAVAIL.

Remarks

The service provider should reserve any non-sharable resources that are required to manage the line. However, any actions that can be postponed to lineMakeCall should be. It is a design assumption in TAPI that lineOpen is an "inexpensive" operation. For example, if the line is opened in monitor mode only, it should not be necessary for a COMM-port-based service provider to open the COMM port.

This procedure does not correspond directly to any procedure at the TAPI level, at which the functions of enabling device-specific extensions, selecting line characteristics, and setting media type detection are included in the functionality defined by lineOpen. At the TSPI level, these additional capabilities are separated out into TSPI_lineNegotiateExtVersion, TSPI_lineSetDefaultMediaDetection and TSPI_lineConditionalMediaDetection.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 3.0 and later Tapicomn.h   Coredll.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

TSPI_lineClose, TSPI_lineConditionalMediaDetection, TSPI_lineNegotiateExtVersion, TSPI_lineNegotiateTSPIVersion, TSPI_lineSetDefaultMediaDetection

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.