lineNegotiateAPIVersion

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

At a Glance

Header file: Tapi.h
Windows CE versions: 1.0 and later

Syntax

LONG lineNegotiateAPIVersion(HLINEAPP hLineApp,
DWORD
dwDeviceID, DWORD dwAPILowVersion,
DWORD
dwAPIHighVersion, LPDWORD lpdwAPIVersion,
LPLINEEXTENSIONID
lpExtensionID);

Parameters

hLineApp

[in] Handle to the application's registration with TAPI.

dwDeviceID

[in] Specifies the identifier of the line device to be queried.

dwAPILowVersion

[in] Specifies the 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.

dwAPIHighVersion

[in] Specifies the 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.

lpdwAPIVersion

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

lpExtensionID

[out] Ignored; set to NULL.

Return Values

Zero indicates success. A negative error number indicates that an error occurred. Possible error values are as follows:

LINEERR_BADDEVICEID LINEERR_
LINEERR_NODRIVER LINEERR_UNINITIALIZED
LINEERR_INCOMPATIBLEAPIVERSION LINEERR_NOMEM
LINEERR_OPERATIONFAILED LINEERR_OPERATIONUNAVAIL
LINEERR_INVALAPPHANDLE LINEERR_NODEVICE
LINEERR_RESOURCEUNAVAIL  

Remarks

Use lineInitialize 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 lineNegotiateExtVersion 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.

See Also

lineInitialize