Google Groepen ondersteunt geen nieuwe Usenet-berichten of -abonnementen meer. Historische content blijft zichtbaar.

Getting caller ID with C# only works once

406 weergaven
Naar het eerste ongelezen bericht

John Vottero

ongelezen,
24 jun 2002, 18:21:2524-06-2002
aan
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

ongelezen,
24 jun 2002, 18:26:0024-06-2002
aan
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

ongelezen,
24 jun 2002, 22:05:1824-06-2002
aan
Thanks, I think that solved the problem!

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

0 nieuwe berichten