다음을 통해 공유


TSPI_phoneNegotiateTSPIVersion (Windows Embedded CE 6.0)

1/6/2010

This function returns the highest SPI version the service provider can operate under for this device, given the range of possible SPI versions.

Syntax

LONG TSPIAPI TSPI_phoneNegotiateTSPIVersion(
  DWORD dwDeviceID, 
  DWORD dwLowVersion, 
  DWORD dwHighVersion, 
  LPDWORD lpdwTSPIVersion 
);

Parameters

  • dwDeviceID
    Phone device for which interface version negotiation is to be performed. Permitted values are strictly within the range of phone devices identifiers for this service provider; the value INITIALIZE_NEGOTIATION is never passed to this function.
  • dwLowVersion
    Lowest TSPI version number under which TAPI can operate. The most significant WORD is the major version number and the least significant WORD is the minor version number.
  • dwHighVersion
    Highest TSPI version number under which TAPI can operate. The most significant WORD is the major version number and the least significant WORD is the minor version number.
  • lpdwTSPIVersion
    Pointer to a DWORD. Upon a successful return from this function the service provider fills this location with the highest TSPI version number, within the range requested by the caller, under which the service provider can operate. The most-significant WORD is the major version number and the least-significant WORD is the minor version number. If the requested range does not overlap the range supported by the service provider, the function returns HONEERR_INCOMPATIBLEAPIVERSION.

Return Value

Returns zero if the function succeeds, or an error number if an error occurs. The following table shows the return values for this method.

Value Description

PHONEERR_INCOMPATIBLEAPIVERSION

The API version is incompatible.

PHONEERR_RESOURCEUNAVAIL

The resource is unavailable.

PHONEERR_NODRIVER

The driver cannot be found.

PHONEERR_OPERATIONFAILED

The operation failed.

PHONEERR_NOMEM

Not enough memory is available.

PHONEERR_OPERATIONUNAVAIL

The operation is unavailable.

Remarks

The service provider returns PHONEERR_OPERATIONUNAVAIL if the operation is not available. However, if the service provider supports any phone devices, it must also support this function and the function must not return PHONEERR_OPERATIONUNAVAIL.

TAPI calls this function early in the initialization sequence for each phone device.

Negotiation of an extension version is done through the separate procedure using the TSPI_phoneNegotiateExtVersionfunction.

The corresponding function at the TAPI level is an overloaded function that also retrieves the extension identifier, if any, supported by the service provider. At the TSPI level, retrieving the extension identifier is accomplished through a separate procedure, namely, the TSPI_phoneGetExtensionIDfunction.

Requirements

Header tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

TSPI Phone Device Functions
TSPI_phoneGetExtensionID
TSPI_phoneNegotiateExtVersion