etDeviceInfo Sample Program

TeleTools

The etDeviceInfo sample application allows you to test your systemís telephony devices to see what basic features they support. All telephony devices on the system are tested against the device-type selected at the top of the user interface ("voice" is selected in the example to the left). Information on what the device supports is then provided in the log box below.

Requirements
Using This Sample Program
Download this Sample Program 
How this Sample Program Works
Source Code
Release Notes

Development Environment Technical Information
Telephony Hardware Technical Information

Requirements

  • You can use this sample with any Edition of TeleTools v3.7

    • TeleTools Express

    • TeleTools Standard

    • TeleTools Professional

    • TeleTools Enterprise

  • Any computer using Windows 95 or later!

Using This Sample Program

Click on one of the radio buttons at the top of the program.

All devices of the selected type will be displayed in the text box.  A small amount of information will be displayed for each device found.

Download this Sample Program

For use with TeleTools v3.7

File

Purpose

EXE

Ready to run!

Borland C++ 4,5,6

Source code

Borland Delphi 5,6,7

Source code

Visual Basic 5,6

Source code

Visual Basic .NET

Source code

Visual C++ 6

Source code

Visual Fox Pro 6

Source code

Tell us what you need?

Click here and tell us what you need!

How this Sample Program Works

When one of the radio buttons is clicked the FillText routine is called.

FillText loops through all of the TAPI line devices available on the computer.  Using the bitmapped flags found in many of the TeleTools properties this routine searches for devices that match the selected type.

If Voice is the selected type of device the FillText calls the FillVoiceDevices routine.  This routine checks to see if the TAPI line device has associated TAPI Phone, wave audio play and wave audio record devices.  If any of these devices are found then their information is also displayed.

Bitmapped Flags

Microsoft's Windows API's utilizes bitmapped flags in order to store a lot of information in a small amount of memory.  For example an integer is made up of 4 bytes, each byte is 8 bits.  Each bit my be turned on or off, one or zero.  This allows one integer to store as many as 32 Boolean values!

For example the property etLine1.DeviceCapabilitiesBearerModes may have the value decimal 73 which is hex 49 and binary 01001001.  The binary representation of the number indicates that 3 flags are turned on,  These are decimal 1, 8, and 64 which are hex 1, 8 and 40.   These values are defined as constants in the etTTConst file supplied with TeleTools:

  Global Const LINEBEARERMODE_VOICE = &H1
  Global Const LINEBEARERMODE_SPEECH = &H2
  Global Const LINEBEARERMODE_MULTIUSE = &H4
  Global Const LINEBEARERMODE_DATA = &H8
  Global Const LINEBEARERMODE_ALTSPEECHDATA = &H10
  Global Const LINEBEARERMODE_NONCALLSIGNALING = &H20
  Global Const LINEBEARERMODE_PASSTHROUGH = &H40
  Global Const LINEBEARERMODE_RESTRICTEDDATA = &H80 'TAPI v2.0

To check to see if a device supports voice calls you could use the following Visual Basic "IF" statement:

  If (etLine1.DeviceCapabilitiesBearerModes And LINEBEARERMODE_DATA) = _
      LINEBEARERMODE_DATA then
    ' This device supports voice
  Else
    'This device does not support voice
  End If

or 

  If (etLine1.DeviceCapabilitiesBearerModes And LINEBEARERMODE_DATA) <> 0 then
    ' This device supports voice
  Else
    'This device does not support voice
  End If

Control

Description

OptionData

Radio button used to select the type of telephony device to be tested

OptionFax

Radio button used to select the type of telephony device to be tested

OptionVoice

Radio button used to select the type of telephony device to be tested

Text1

Displays the list of devices found that support the type of device identified with the radio buttons. The basic features for the device are also displayed.

etLine1

Use for collecting information about the TAPI Line devices.

etPhone1

Used for collecting information about the TAPI Phone device associated with the TAPI Line devices.

etPlay1

Used for collecting information about the audio play device associated with the TAPI Line devices.

etRecord1

Used for collecting information about the audio record device associated with the TAPI Line devices.

 

Event Handler Routine

Description

Form_Load

Enable the TeleTools controls

Form_Resize

Resizes the controls when the form is resized

OptionData_Click

Causes information to be displayed for TAPI line devices that support data calls

OptionFax_Click

Causes information to be displayed for TAPI line devices that support fax calls

OptionVoice_Click

Causes information to be displayed for TAPI line devices that support voice calls

 

Subroutine

Description

FillVoiceDevices

Displays information about TAPI line devices that support voice

FillText

Displays information about TAPI line devices

 

Release Notes

April 8

Published