lineNegotiateAPIVersion (Windows Embedded CE 6.0)
1/6/2010
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 dwAPILowVersion and dwAPIHighVersion.
- lpExtensionID
[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 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 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.
Requirements
Header | tapi.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 1.0 and later |
See Also
Reference
lineInitialize
lineNegotiateExtVersion