|
Device Classes
A device class is a group of related physical devices or device drivers through which
applications send and receive the information or data that makes up a call. Every
device class has a device class name that uniquely identifies the class, and provides information about the
programming interface and commands that can be used to open and communicate with the
devices in the class.
The Telephony application programming interface (TAPI) associates devices from
one or more device classes to each line or phone device. You access one of
these devices by retrieving the device identifier for the device using the lineGetID or phoneGetID function. You supply the device class name, and the function returns the
specific port name, device name, device handle, or device identifier that you need
to open and access the device. The format of the information returned depends
on the device class and is described in subsequent topics of this section.
Note The device identifier definitions apply to 16-bit and 32-bit TAPI. In some
cases, the data type of a media handle in the device identifier definition may
be different from that specified by the Microsoft® Windows® operating system version 3.x or Microsoft® Win32® application programming interface. For example, Windows version 3.x and Win32 define wave device identifiers with the UINT type, but TAPI defines this device identifier with the DWORD type. In such cases, you should cast the media handle to the appropriate data
type when using it with the Windows version 3.x or Win32 API.
You also use device class names with the lineConfigDialog and phoneConfigDialog functions to enable the user to set configuration options for the given
device, with the lineGetIcon and phoneGetIcon functions to retrieve an icon to represent the given device, and with the lineGetDevConfig and lineSetDevConfig functions to directly retrieve and set configuration options for the given
device.
By default, there are the following device class names.
Device Class Name
| Description
| comm
| Communications port.
| comm/datamodem
| Modem through a communications port.
| comm/datamodem/portname
| Name of the device to which a modem is connected.
| wave/in
| Wave audio device (input only).
| wave/out
| Wave audio device (output only).
| midi/in
| Midi sequencer (input only).
| midi/out
| Midi sequencer (output only).
| tapi/line
| Line device.
| tapi/phone
| Phone device.
| ndis
| Network device.
| tapi/terminal
| Terminal device.
|
Note These names are not case sensitive; you can use any combination of uppercase
and lowercase letters.
Additional device classes and device class names may be available on a given
system. In general, if a device does not belong to one of the default device
classes, the manufacturer typically defines a new device class and assigns a
unique device class name. Check the documentation for the device to determine what
additional device classes are available for it. Note, however, that although the
device class and media mode are related, they are not the same. A media mode
describes a format of information on a call, and a device class defines the
programming interface used to manage that information. So, even if a manufacturer
defines a new media mode, it is not necessarily true that the manufacturer also
needs to define a new device class to support the mode.
The format of the configuration data used with the lineSetDevConfig and lineGetDevConfig functions also depends on the device class. In general, you use lineGetDevConfig to save a copy of the current device configuration data and then later use lineSetDevConfig with the saved configuration data to restore the device configuration to the
previous state. This is a convenient way to temporarily change the
configuration without requiring the user to manually restore it to the previous state.
Because the exact format of the device configuration data may be different with
each service provider, you should not use lineSetDevConfig and lineGetDevConfig to manipulate the device configuration data directly. Some formats are
provided only for information.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|