🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #219

Re: TAPI Detection

#219
From: Bob Gonder
Date: Thu, 10 Jul 2008 17:54
58 lines
3035 bytes
"Mark Jacobs" <www.jacobsm.com/mjmsg.htm?Borland Newsgroup> wrote:

>How does one detect a valid TAPI device is installed? Because of the 
>unimodem stack built in to XP, functions like lineInitialize and lineOpen 
>work fine, but fail to actually do anything! TIA,

I suppose it depends on what it is you want to do with the line.
From the example code (includes exe) linked from here
EnumTAPI sample application
http://tapifaq.pennypacker.org/

It looks like you might want
  // Make sure the "comm/datamodem" device class is supported
   lReturn = lineGetID(hLine, 0, 0, LINECALLSELECT_LINE,
      (VARSTRING*)&SmallVarString, "comm/datamodem");
   if (lReturn)
      bSupportsDataComm = FALSE;
   else
      CloseHandle((HANDLE) SmallVarString.handle);
   // Print the comm/datamodem results.
   if (bSupportsDataComm)
      MyPrintf("Y, ");
   else
      MyPrintf("N, ");

XP results:

G:\>enumtapi
Installed TAPI Version is 2.2
Installed TAPI Service Providers
<- dwPermanentProviderID
           <- ProviderFilename
0x00000001 unimdm.tsp
0x00000002 kmddsp.tsp
0x00000003 ndptsp.tsp
0x00000004 ipconf.tsp
0x00000005 h323.tsp
0x00000006 hidphone.tsp

Installed TAPI line Devices
<- dwDeviceID
|   <- Max dwAPIVersion
|   |    <- dwNumAddresses
|   |    |  <- dwPermanentLineID
|   |    |  |           <- Capable of making voice comm/datamodem calls?
|   |    |  |           |  <- Capable of making automated voice calls?
|   |    |  |           |  |  <- Call in progress?
|   |    |  |           |  |  |  <- Any application waiting for calls?
|   |    |  |           |  |  |  |  <- Service Povider - Line Device Name
V   V    V  V           V  V  V  V
0 , 2.2, 1, 0x0002CE56, Y, N, N, N, unimdm.tsp - Conexant D480 MDC V.92 Modem - COM3
1 , 1.3, 1, 0x00000001, N, N, ?, ?, kmddsp.tsp - RAS PPPoE Line0000
2 , 1.3, 1, 0x00000003, N, N, ?, ?, kmddsp.tsp - RAS VPN Line 0
3 , 2.2, 1, 0x2182AD70, N, N, N, N, ndptsp.tsp - WAN Miniport (L2TP)
4 , 2.2, 1, 0x00040000, N, N, N, N, ipconf.tsp - IPCONF LINE
5 , 2.2, 1, 0x00050000, N, N, N, N, h323.tsp - H323 Line

G:\>
Technical Details
Message-ID: <8lgc74l1mhl0j0dehiqmf2dfsd06qmn9ga@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4875222d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b88259085940373f
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <none@nowhere.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: TAPI Detection
Date: Thu, 10 Jul 2008 10:54:31 -0700
Message-ID: <8lgc74l1mhl0j0dehiqmf2dfsd06qmn9ga@4ax.com>
References: <4875222d$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.146.174
X-Trace: newsgroups.borland.com 1215712468 67.77.146.174 (10 Jul 2008 10:54:28 -0700)
Lines: 61
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail