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. |
This function enables an application to negotiate an TAPI version to use.
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] Identifier of the line device to be queried.
- dwAPILowVersion
-
[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.
- dwAPIHighVersion
-
[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.
- 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 dwAPILowVersionand dwAPIHighVersion.
- lpExtensionID
-
[out] Pointer to a structure of type LINEEXTENSIONID. If the service provider for the specified dwDeviceIDparameter 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 Value
Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.
Value | Description |
---|---|
LINEERR_BADDEVICEID |
The device identifier provided is incorrect. |
LINEERR_NODRIVER |
No driver was found. |
LINEERR_INCOMPATIBLEAPIVERSION |
The API version is incompatible. |
LINEERR_OPERATIONFAILED |
The operation failed. |
LINEERR_INVALAPPHANDLE |
The handle was invalid. |
LINEERR_RESOURCEUNAVAIL |
The resource is unavailable. |
LINEERR_INVALPOINTER |
The pointer is invalid. |
LINEERR_UNINITIALIZED |
The parameter is uninitialized. |
LINEERR_NOMEM |
No memory is available. |
LINEERR_OPERATIONUNAVAIL |
The operation is unavailable. |
LINEERR_NODEVICE |
No devide was found. |
Remarks
Use the lineInitializefunction to determine the number of line devices present in the system. The device identifier specified by dwDeviceIDvaries from zero to one less than the number of line devices present.
The lineNegotiateAPIVersionfunction 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 lineNegotiateExtVersionfunction 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.
Requirements
Header | tapi.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |