A other code example with the same problem
- From: "Robert M." <newsgroups.rm@xxxxxxxxx>
- Date: Tue, 22 Jul 2008 11:52:50 +0200
--------------------------------------------------------------------
Option Compare Database
' Benötigte API-Deklaration
Private Declare Function tapiRequestMakeCall Lib "tapi32.dll" ( _
ByVal lpszDestAddress As String, _
ByVal lpszAppName As String, _
ByVal lpszCalledParty As String, _
ByVal lpszComment As String) As Long
'Declare Function tapiRequestDrop Lib "tapi32.dll" ( _
ByVal hwnd As Long, _
ByVal wRequestID As Long) As Long
Private Declare Function lineClose Lib "tapi32.dll" (ByVal hLine As Long) As Long
Private Const TAPIERR_NOREQUESTRECIPIENT = -2&
Private Const TAPIERR_REQUESTQUEUEFULL = -3&
Private Const TAPIERR_INVALDESTADDRESS = -4&
Sub nummernanwahl()
'Dial("01738054118","")
End Sub
' Windows-Wählhilfe starten und Telefonnummer wählen
Public Function Dial()
'(ByVal sPhoneNumber As String, _
ByVal sRecipient As String, _
Optional ByVal sComment As String = "")
Dim sPhoneNumber As String, sRecipient As String, sComment As String
Dim sBuffer As String
Dim nResult As Long
Dim i As Byte, j As Byte
j = 1
For i = 0 To j
'An example for a invalid number
sPhoneNumber = "00123456789"
sRecipient = ""
sComment = ""
' Wählhilfe starten und Telefonnummer wählen
'nResult = tapiRequestMakeCall(sPhoneNumber, App.ProductName, sRecipient, sComment)
nResult = tapiRequestMakeCall(sPhoneNumber, "", sRecipient, sComment)
nResult = lineClose(7)
' Rückgabewert auswerten
If nResult <> 0 Then
' Fehler!
Select Case nResult
Case TAPIERR_NOREQUESTRECIPIENT
MsgBox "Die Windows Wählhilfe ist nicht installiert" & _
" oder konnte nicht gestartet werden!"
Case TAPIERR_REQUESTQUEUEFULL
MsgBox "Die Anrufschlange ist voll!"
Case TAPIERR_INVALDESTADDRESS
MsgBox "Ungültige Telefonnummer!"
Case Else
MsgBox "Sonstiger Fehler!"
End Select
End If
Next i
End Function
------------------------------------------------------------------------------------
Robert M. wrote:
Hello peoples,.
I have a little Tool in VBA Acess, that make from the selected line a call.
You can download the file here:
http://rapidshare.de/files/40053017/tapi-2000.mdb.html
My problems are:
1. I can´t disconnect the call
2. The error responding, how i can determine, that is a invalid number, is not functional and i have no idea, why.
Can my anyone help? I´m a newbie with TAPI and i can´t find a solution :(
Thanks und greetings from Germany,
Robert
P.S.: I hope you can understand my scool-english :)
- Follow-Ups:
- Re: A other code example with the same problem
- From: Andreas Marschall [MVP TAPI]
- Re: A other code example with the same problem
- References:
- Prev by Date: A other code example, with the same problem
- Next by Date: Re: TSP Extension Number Monitoring
- Previous by thread: A other code example, with the same problem
- Next by thread: Re: A other code example with the same problem
- Index(es):
Relevant Pages
|