RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: VB5,VB6
Expertise: Intermediate
Jan 11, 2001



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Make a phone call using TAPI

If TAPI libraries are installed on your machine, you can easily dial a number from a VB application using a single API call. Here's a function that encapsulates the call and that returns True if the dialing was successful:

Private Declare Function tapiRequestMakeCall Lib "TAPI32.DLL" (ByVal Dest As _
    String, ByVal AppName As String, ByVal CalledParty As String, _
    ByVal Comment As String) As Long

' make a phone call using TAPI
' return True if successfull

Function PhoneCall(ByVal PhoneNumber As String, ByVal DestName As String, _
    Optional ByVal Comment As String) As Boolean
    If tapiRequestMakeCall(Trim$(PhoneNumber), App.Title, Trim$(DestName), _
        Comment) = 0 Then
        PhoneCall = True
    End If
End Function
This code works on Windows 95, Windows 98, Windows NT 4 SP3 or later, and Windows 2000, and requires TAPI 1.3 libraries or a later version.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date