by Anonymous (267 Submissions)
Category: Registry
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 28th April 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Use TAPI32 to dial a telephone number.
API Declarations
Private Const TAPIERR_NOREQUESTRECIPIENT = -2&
Private Const TAPIERR_REQUESTQUEUEFULL = -3&
Private Const TAPIERR_INVALDESTADDRESS = -4&
Dim strBuff As String
Dim lngResult As Long
lngResult = tapiRequestMakeCall&(strNumber, CStr(Caption), strLocation, "")
If lngResult <> 0 Then
strBuff = "Error dialing number : "
Select Case lngResult
Case TAPIERR_NOREQUESTRECIPIENT
strBuff = strBuff & "No Windows Telephony dialing application is running and none could be started."
Case TAPIERR_REQUESTQUEUEFULL
strBuff = strBuff & "The queue of pending Windows Telephony dialing requests is full."
Case TAPIERR_INVALDESTADDRESS
strBuff = strBuff & "The phone number is not valid."
Case Else
strBuff = strBuff & "Unknown error."
End Select
MsgBox strBuff
End If
End Sub