Partager via


Telephony Service Provider Interface

TAPI 2.0 requires a device that is based on Windows CE to have not just a TAPI-compliant application, but also a TSPI. This interface talks directly to the hardware to convert TAPI service requests into commands that are "understood" by the hardware. The TSPI is responsible for managing the data from TAPI to control line devices and telephone devices.

In Windows CE, a TSPI module is a DLL that provides communication services over a telephone network through a set of exported functions that are called by TAPI. The Tspi.h header file should be used only in conjunction with the Tapi.h header file. Most parameters are passed through from corresponding procedures in Tapi.h.

TAPI supports the lineAddProvider function, which installs a new TSPI into the telephony system. When an application calls this function, TAPI verifies that it can access the service provider. If the function fails, or if the DLL or the service provider cannot be found, the provider is not added to the telephony system. If the function succeeds, and if the system is active, TAPI starts the new service-provider DLL.

Any number of service providers can be installed on a computer, as long as the service providers do not attempt to access the same hardware device at the same time. The association between the hardware and the service provider is indicated in the registry. Some service providers might be capable of accessing multiple devices. In some cases, installation might require a device driver along with the service provider.

Applications use the TAPI functions to determine the services that are available on the device. TAPI identifies available service providers and the services that are supported, and provides this data to applications. In this way, any number of applications can request services from the same service provider; TAPI manages all access to the service provider.

A TSP must support the TSPI_provider functions that are called by TAPI. A TSP can choose not to support almost any TSPI function.

In Windows CE, the only required DLL export function from a TSPI DLL is the TSPI_lineGetProcTable function. This function is used to return to TAPI the addresses of the interface functions of the TSP.

LONG TSPIAPI TSPI_lineGetProcTable 
(
  LPTSPI_PROCS *lplpTSpiProcs
);

The lplpTSpiProcs parameter is a pointer to the TSPI_PROCS structure, which is defined in the Tapicomn.h header file. TSPI_PROCS contains the table of function addresses that is returned when the TSPI_lineGetProcTable function is called.

Some of the TSPI functions, such as TSPI_lineCompleteCall, are not called by TAPI. Windows CE still supports these functions to maintain backwards compatibility with older versions of the operating system.

See Also

TSPI Functions | Porting a TSP | Sample TSP | lineAddProvider

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.