다음을 통해 공유


Configuring TAPI line devices in Windows CE

In Windows CE, TAPI listens for device plug and play notifications. When it gets notified of a new device, it looks in the device driver’s key and subkeys for a REG_SZ value named Tsp. If it is found, it specifies the dll name of a TSP (TAPI Service Provider, for instance, unimodem.dll) to be associated with this device. TAPI loads the TSP and calls both its TSPI_providerCreateLineDevice and TSPI_providerCreatePhoneDevice functions with 3 parameters: a handle to the new device’s “active” registry key (i.e. HKEY_LOCAL_MACHINE\Drivers\Active\NN), the device driver registry key path string, and the new device’s name.

 

Take for example, a new serial driver, BSPSerial.dll. Its device driver key would look something like this:

 

[HKEY_LOCAL_MACHINE\Drivers\Builtin\BSPSerial]

“Dll”=”bspserial.dll”

“Prefix”=”COM”

“Index”=dword:1

“DeviceArrayIndex”=dword:0

 

To expose it as a null modem Unimodem controlled TAPI line device, add this key and these values:

 

[HKEY_LOCAL_MACHINE\Drivers\Builtin\BSPSerial\Unimodem]

“Tsp”=”unimodem.dll”

“DeviceType”=dword:0

 

(DeviceType == 0 means null modem, see unimodem.h for the complete list of values)

 

Additionally, BSPSerial could be exposed as a Hayes compatible Unimodem controlled TAPI line device by adding this key:

 

[HKEY_LOCAL_MACHINE\Drivers\Builtin\BSPSerial\UnimodemHayes]

“Tsp”=”unimodem.dll”

“DeviceType”=dword:1

 

These two subkeys of BSPSerial will cause two TAPI line devices to appear when BSPSerial’s COM1: device is created.

 

In the first version of Windows CE, the unimodem device settings were located directly in the device driver key. This limited TAPI configurability by not allowing multiple TSPs to use the same device and by not allowing multiple unimodem line device types on the same device. This configuration is still allowed, although discouraged.

 

For unimodem, this limitation was overcome with the HKEY_LOCAL_MACHINE\ExtModems key. Unimodem.dll reads this key immediately after system initialization and instantiates the line devices listed.

 

Author: David Kanz