Platform SDK: TAPI |
The TSPI_phoneDevSpecific function and associated PHONE_DEVSPECIFIC message enable the TAPI client application to access device-specific phone features that are unavailable through the common telephony services on phones. The parameter profile of the TSPI_phoneDevSpecific function is generic in that little interpretation of the parameters is made by TSPI. Device-handle parameters have TSPI-defined meanings and are translated appropriately between the application and the service provider. Generic parameters are simply passed through unmodified. The interpretation of the generic parameters is defined by the service provider and must be understood by any applications that use them. An application that relies on device-specific extensions will not generally work with other service providers. However, applications written entirely to the common telephony phone services will work with the extended service provider.
Regarding handle translation, the passthrough nature of the generic parts of device-specific extensions has an imporant consequence. A service provider has no way to relate the handles used at the TSPI level to those at the TAPI level except by passing them through the predefined handle parameters and fields. Any handle put into the generic extension area is untranslated by TAPI as it is passed between application and service provider. The designer of a service-provider extension should generally not define extensions that pass handles in this way.
The appropriate approach to define a device-specific extension that needs to refer to specific devices without using handles is to refer to them using their absolute device identification. The device identifier used in opening a phone at the TAPI level, for example, is strictly the same value that is used at the TSPI level to open the phone.
This is the motivation for the dwPhoneDeviceIDBase parameter in the TSPI_providerInit function. It adjusts the service provider's device identifier numbering to be the same as the numbering used at the TAPI level. This gives the service-provider designer the flexibility to use device identifiers to identify devices in device-specific extensions.
There is no central registry for manufacturer identifiers. Instead a unique identifier generator, called Extidgen.exe, is made available as part of TSPI. The vendor that designs a set of device-specific extensions uses this utility to obtain a unique identifier for those extensions. This unique identifier must be published as part of the specification of the extensions to allow application developers to access the extensions.