Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to dial with API ?

4 views
Skip to first unread message

Kinson

unread,
May 29, 1999, 3:00:00 AM5/29/99
to
I have a learning edition of Visual Basic , and without a componment called
" Microsoft Communication " . How can I make a program that dial phone with
modem , and NOT in internet ( just as a simple telephone ) ? Please tell me
how to dial , hang up , as well as receiving dial tones . Thanks .

Babu

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Hi Kinson,
Create a project with a form and a code module. Add a command button to
the form. Paste the following code in the code window:

Option Explicit

Private Sub Command1_Click()
DialNumber (333333)
End Sub

Function DialNumber(PhoneNumber)
Dim RetVal As Long
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", "", "")
If RetVal < 0 Then
MsgBox "Unable to dial number " & PhoneNumber
End If
End Function

Paste the following declaration in the code module:

Declare Function tapiRequestMakeCall Lib "tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long


Click on the command button to dial the number.
Hope this helps. Have a look at other TAPI functions for other
functionality.

Regards,
Babu.


Kinson <kin...@netteens.net> wrote in message
news:7inror$ilq$1...@imsp026.netvigator.com...

0 new messages