Make a phone call using TAPI

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 successfullFunction 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 IfEnd 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.

See also  Essential Measures for Safeguarding Your Digital Data

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist