TAPI for VB 6
Posted on 2006-05-24
Does anybody have a simple sample that will do the following:
Identify the TAPI devices that I have,
Be able to select a specific device
and make a call through that device.
I have the UI built and I have a simple make call but I want to be able to do the top two items of my request. Here is the sample code:
Declare Function tapiRequestMakeCall Lib "tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
'Following function receives a phone number to dial.
Function DialNumber (PhoneNumber)
Dim Msg As String
Dim RetVal As Long
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", "", "")
If RetVal < 0 Then
Msg = "Unable to dial number " & PhoneNumber