Take care to ensure accurate listing of service dependencies among TAPI (specifically, the telephony service—tapisrv.exe), other service applications that use TAPI, and telephony service providers that use other services.
The installation program for the service application or telephony service provider must record these dependencies with the Service Control Manager.
Note Failure to list TAPI as a dependency of the service application or failure to list another service as a dependency of TAPI can result in the system hanging.
List "Telephony Service" as a dependency of any service application that initializes a TAPI line or phone function. When TAPI is a dependency of a service application, the installation program must include "Telephony Service" in the list of service names passed to the lpDependencies parameter of the CreateService function.
When another service is activated by the telephony service provider during the service provider startup (during TSPI_providerEnumDevices, TSPI_lineNegotiateTSPIVersion, or TSPI_providerInit), the service started by the telephony service provider must be listed as a dependency of the "Telephony Service." As a service that starts dynamically, TAPI starts all telephony service providers during its startup, and it is critical for the Service Control Manager to know when any service provider starts another service during telephony service provider startup.
Call the QueryServiceConfig function to determine the existing configuration of "Telephony Service", including dependencies. If the service or services started by the telephony service provider are not already included in the dependencies of the "Telephony Service", add the necessary items to the dependency list and call ChangeServiceConfig to update the dependencies.
For additional information about changing a service configuration, see the Microsoft Platform Software Development Kit.