Re: A other code example with the same problem



"Robert M." <newsgroups.rm@xxxxxxxxx> schrieb im Newsbeitrag
news:g64alr$cd4$1@xxxxxxxxxxxx
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.


Robert,
please see inline comments.


Private Declare Function tapiRequestMakeCall Lib "tapi32.dll" ( _

'Declare Function tapiRequestDrop Lib "tapi32.dll" ( _

tapiRequestDrop() is nonfunctional, please see MSDN.


Private Declare Function lineClose Lib "tapi32.dll" (ByVal hLine As

If you want to lineClose() then you need to successfully lineOpen() first.

Please note that TAPI Assisted Telephony (i.e. tapiRequestMakeCall) is
different from a full featured TAPI application (using the lineXXX()
functions).

TAPI Assisted Telephony you can only(!) intiate a call to be made with MS
Dialer.exe (or another registered TAPI app).
You cannot control the call from your app any further but your need to use the
Dialer to do so.

If you need full call control within your app then you need to implement a
full featured TAPI app e.g. like this (simplified):
- lineInitializeEx()
- lineOpen()
- lineMakeCall()
- lineDrop()
- lineDeallocateCall()
- lineClose()
- lineShutdown()


'nResult = tapiRequestMakeCall(sPhoneNumber, App.ProductName,
sRecipient, sComment)
nResult = tapiRequestMakeCall(sPhoneNumber, "", sRecipient, sComment)

Why do you make two function calls?


nResult = lineClose(7)

What is 7 ?
lineClose() will work only within a full featured TAPI app, see above.


' Rückgabewert auswerten
If nResult <> 0 Then

Here you are only evaluating the return value from lineClose() but you miss
the ones from your two tapiRequestMakeCall().

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.



.



Relevant Pages

  • Re: lineOpen fails when opening a second time
    ... > line to the modem is not freed properly with calling lineClose. ... Andreas Marschall ... Microsoft MVP for TAPI / Windows SDK ...
    (microsoft.public.win32.programmer.tapi)
  • Re: get process id from tsp
    ... "Flopik" schrieb im Newsbeitrag ... > Im using ProcessXp to find the svchost that load Tapi.dll. ... What error codes do you get from lineClose() / lineShutdown? ... See my TAPI and TSPI FAQ: ...
    (microsoft.public.win32.programmer.tapi)
  • Re: TAPI intercepts only 1st call entering
    ... >> I use TAPI functions to intercept incoming calls. ... > No need to lineClose or even lineShutdown. ... > * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: lineClose
    ... was there a call present at lineClose()? ... See my TAPI and TSPI FAQ: ... Can you reproduce the issue with TAPI Browser TB20? ...
    (microsoft.public.win32.programmer.tapi)