Use TAPI32 to dial a telephone number.
Use TAPI32 to dial a telephone number.
API Declarations
Private Const TAPIERR_NOREQUESTRECIPIENT = -2&
Private Const TAPIERR_REQUESTQUEUEFULL = -3&
Private Const TAPIERR_INVALDESTADDRESS = -4&
Rate Use TAPI32 to dial a telephone number.
(3(3 Vote))
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
Use TAPI32 to dial a telephone number. Comments
No comments yet — be the first to post one!
Post a Comment