Re: Problem at 2nd Connectl (TAPI 3)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Daniel Ramirez (desarrollo_at_aseproda.com)
Date: 02/17/05


Date: Thu, 17 Feb 2005 11:13:38 +0100

Thank you.

Iīll try releasing every call related resources as you say. I havenīt tried
it with returned interface from events. Iīll post when I do it.

(About the advise: ehm... bad log... xD But itīs almost the same. I receive
the same error anyway. My problem is related to call resources, almost
sure.)

"Andreas Marschall [MVP TAPI]" <Andreas.Marschall@I-B-A-M.de> escribió en el
mensaje news:uIBHO9FEFHA.1188@tk2msftngp13.phx.gbl...
> Daniel, please see inline comments.
>
> "Daniel Ramirez" <desarrollo@aseproda.com> schrieb im Newsbeitrag
> news:uyy7p2BEFHA.1012@TK2MSFTNGP14.phx.gbl...
>> I register two telephone addresses and call from one to another using
>> CreateCall and Connect (async). No problem at this point. Then, the call
>> ends and I repeat the CreateCall and the Connect, and...
>> "try-it-again-there-are-a-lot-of-prices"... but not today (Spanish
>> joke... I
>> donīt know if in English... )
>>
>> I suspect itīs because or bad releasing or something like that. Here you
>> have TB3 log.
>>
>> (Iīm using Windows XP sp2 with atcp2.tsp. Itīs 3rd party. Iīm using a
>> PBX...
>> Everything is supposed to be compatible with TAPI)
>
>
> It seems that you TB3x log is not from XP but from W2k !?
> On XP (TAPI 3.1) you get an ITCollection2 back from ::get_Addresses (),
> on W2k (TAPI 3.0) it is a ITCollection like in your log.
>
>
>> ITTAPI.CreateInstance ITTAPI_1
>> returned hr = 0x00000000
>>
>> ITTAPI_1.Initialize returned hr = 0x00000000
>>
>> ITTAPI_1.get_Addresses returned hr = 0x00000000
>> VARIANT* pVariant = ITCollection_1
>>
>> ITCollection_1.get_Item
>> long Index : 9 (0x00000009)
>> returned hr = 0x00000000
>> VARIANT* pVariant = ITAddress_1
>>
>> ITCollection_1.get_Item
>> long Index : 14 (0x0000000e)
>> returned hr = 0x00000000
>> VARIANT* pVariant = ITAddress_2
>>
>> ITCollection_1.Release /* Is this neccesary ???????*/
>
> No, it isn't required due to it doesn't allocate any resources in the
> TSPs.
>
>
>> ITTAPI_1.put_EventFilter
>> long plFilterMask : 78 (0x0000004e)
>> returned hr = 0x00000000
>>
>> ITTAPI_1.AdviseEventNotification returned hr = 0x00000000
>> cookie 15124995
>
> What about ITTAPI_1.RegisterCallNotifications() ?
> See my TAPI and TSPI FAQ:
> Q: How do I enable events (put_EventFilter, RegisterCallNotifications) in
> TAPI
> Browser TB3x ?
> http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_How_do
>
>
>> ITAddress_1.CreateCall
>> BSTR pDestAddress : 31
>> long lAddressType : 1 (0x00000001)
>> long lMediaTypes : 8 (0x00000008)
>> returned hr = 0x00000000
>> ITBasicCallControl** ppCall = ITBasicCallControl_1
>>
>> ITBasicCallControl_1.Connect
>> VARIANT_BOOL fSync : 0
>> returned hr = 0x00000000
>>
>> ITCallStateEvent_1
>> TAPI_EVENT const int TE_CALLSTATE
>
> Please call ITCallStateEvent_1.get_State() and .get_Cause()
>
>
>> ITCallInfoChangeEvent_1
>> TAPI_EVENT const int TE_CALLINFOCHANGE
>
> Please call ITCallInfoChangeEvent_1.get_Cause()
>
>
>> ITCallInfoChangeEvent_2
>> TAPI_EVENT const int TE_CALLINFOCHANGE
>
>
> Please call ITCallInfoChangeEvent_2.get_Cause()
>
>
>> ITCallStateEvent_2
>> TAPI_EVENT const int TE_CALLSTATE
>
> Please call ITCallStateEvent_2.get_State() and .get_Cause()
>
>
>> ITCallStateEvent_3
>> TAPI_EVENT const int TE_CALLSTATE
>
>
> Please call ITCallStateEvent_3.get_State() and .get_Cause()
>
>
>> ITBasicCallControl_1.Release /* Is this neccesary too???????? */
>
> Depending on the TSP, yes, maybe.
> It is always recommended (and often required) to release all(!) call
> related
> resources.
> So in addition I recommend releasing:
> ITBasicCallControl_1
> ITCallStateEvent_1
> ITCallStateEvent_2
> ITCallStateEvent_3
> ITCallInfoChangeEvent_1
> ITCallInfoChangeEvent_2
>
>
>> ITAddress_1.CreateCall
>> BSTR pDestAddress : 31
>> long lAddressType : 1 (0x00000001)
>> long lMediaTypes : 8 (0x00000008)
>> returned hr = 0x00000000
>> ITBasicCallControl** ppCall = ITBasicCallControl_2
>>
>> ITBasicCallControl_2.Connect
>> VARIANT_BOOL fSync : 0
>> returned hr = 0x80040003
>> TAPI_E_NOTSUPPORTED source (null) description (null)
>>
>> ITCallStateEvent_4
>> TAPI_EVENT const int TE_CALLSTATE /* WHY?! HOW?! Because the error???*/
>
>
> Please call ITCallStateEvent_4.get_State() and .get_Cause()
>
>
>> ITAddress_1.Release
>> ITAddress_2.Release
>> ITCallStateEvent_1.Release
>> ITCallInfoChangeEvent_1.Release
>> ITCallInfoChangeEvent_2.Release
>> ITCallStateEvent_2.Release
>> ITCallStateEvent_3.Release
>> ITBasicCallControl_2.Release
>> ITCallStateEvent_4.Release
>> ITTAPI_1.Shutdown returned hr = 0x00000000
>> ITTAPI_1.Release
>
> --
> Best Regards
> Andreas Marschall
> Microsoft MVP for TAPI / Windows SDK
> TAPI / TSP Developer and Tester
> http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
> * 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: Svchost.exe process locks cpu at 100%
    ... Maybe some resources weren't released properly, ... Microsoft MVP for TAPI / Windows SDK ... TAPI development around the world (Frappr! ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: ITBasicCallControl::Connect returns -2147221497 (OLE_E_BLANK)
    ... So I suggest to primarily conentrate of releasing a call related resources ... Microsoft MVP for TAPI / Windows SDK ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Seconad call error!
    ... "Teera " schrieb im Newsbeitrag ... Microsoft MVP for TAPI / Windows SDK ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Garbage Colletor
    ... It's extremely easy to handle resources in C++ as you stated but the ... Logically speaking, the memory is still in fact available, the moment you release your last reference to it. ... The "using" statement and IDisposable exist for one purpose: to explicitly release resources held by an object without releasing the object itself. ... In fact, the garbage collection model is, at least for that particular operation, much more efficient, because there's no need to go through the entire object cleaning things up. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Lost Device - Release Timing
    ... But I think that detecting loss and releasing at that time might not be the ... Because when your device is lost, usually it's your app being ... > When the device is lost, some resources need releasing before calling ...
    (microsoft.public.win32.programmer.directx.graphics)