Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting caller ID with C# only works once

406 views
Skip to first unread message

John Vottero

unread,
Jun 24, 2002, 6:21:25 PM6/24/02
to
I converted the TAPI3 type library into a C# assembly and wrote a C# program
to capture caller ID information. It works but only for the first call.
The first call I receive the following TAPI events:

TE_CALLNOTIFICATION
TE_CALLSTATE (CS_OFFERING)
TE_ADDRESS (AE_RINGING)
TE_CALLINFOCHANGED
TE_CALLINFOCHANGED
TE_ADDRESS (AE_RINGING, for each ring)
TE_CALLSTATE (CS_DISCONNECTED)

after that, the only event I receive is:

TE_ADDRESS (AE_RINGING)

I'm afraid that the TAPI session isn't closed until garbage collection
releases the TAPI COM interfaces.

Does anyone have TAPI working in C#? Does anyone know how to force the
garbage collector to release a COM interface?

Thanks,

John Vottero


Greg Ewing

unread,
Jun 24, 2002, 6:26:00 PM6/24/02
to
John, you could try to
System.Runtime.InteropServices.Marshal.ReleaseComObject(object). That will
force .NET to release the reference to your COM object. I've never tried
that in the exact scenario you are trying but it could be a start.

--
Greg
http://www.claritycon.com/

"John Vottero" <Jo...@mvpsi.com> wrote in message
news:efZRf18GCHA.404@tkmsftngp13...

John Vottero

unread,
Jun 24, 2002, 10:05:18 PM6/24/02
to
Thanks, I think that solved the problem!

"Greg Ewing" <gewing@_NO_SPAM_claritycon.com> wrote in message
news:OrFfL48GCHA.2148@tkmsftngp08...

0 new messages