lineNegotiateAPIVersion (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function enables an application to negotiate an TAPI version to use.

LONG lineNegotiateAPIVersion(
  HLINEAPP hLineApp, 
  DWORD dwDeviceID, 
  DWORD dwAPILowVersion, 
  DWORD dwAPIHighVersion, 
  LPDWORD lpdwAPIVersion, 


[in] Handle to the application's registration with TAPI.
[in] Identifier of the line device to be queried.
[in] Least recent TAPI version the application is compliant with. The high-order word is the major version number; the low-order word is the minor version number.
[in] Most recent TAPI version the application is compliant with. The high-order word is the major version number; the low-order word is the minor version number.
[out] Pointer to a DWORD-sized location that contains the TAPI version number that was negotiated. If negotiation succeeds, this number is in the range between dwAPILowVersion and dwAPIHighVersion.
[out] Pointer to a structure of type LINEEXTENSIONID. If the service provider for the specified dwDeviceID parameter supports provider-specific extensions, then, upon a successful negotiation, this structure is filled with the extension identifier of these extensions. This structure contains all zeros if the line provides no extensions. An application can ignore the returned parameter if it does not use extensions.

Return Values

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

LINEERR_BADDEVICEIDThe device identifier provided is incorrect.
LINEERR_NODRIVERNo driver was found.
LINEERR_INVALAPPHANDLEThe handle was invalid.
LINEERR_RESOURCEUNAVAILThe resource is unavailable.
LINEERR_INVALPOINTERThe pointer is invalid.
LINEERR_UNINITIALIZEDThe parameter is uninitialized.
LINEERR_NOMEMNo memory is available.
LINEERR_OPERATIONUNAVAILThe operation is unavailable.
LINEERR_NODEVICENo devide was found.


Use the lineInitialize function to determine the number of line devices present in the system. The device identifier specified by dwDeviceID varies from zero to one less than the number of line devices present.

The lineNegotiateAPIVersion function is used to negotiate the TAPI version number to use. It also retrieves the extension identifier supported by the line device, and returns zeros if no extensions are supported. If the application wants to use the extensions defined by the returned extension identifier, it must call the lineNegotiateExtVersion function to negotiate the extension version to use.

The TAPI version number negotiated is that under which TAPI can operate. If version ranges do not overlap, the application and API or service provider versions are incompatible and an error is returned.


OS Versions: Windows CE 1.0 and later.
Header: Tapi.h.
Link Library: Coredll.lib.

See Also

lineInitialize | lineNegotiateExtVersion

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.