IDispEventSimpleImpl<> clients and DispEventUnadvise() doesn't seem to work. 
Author Message
 IDispEventSimpleImpl<> clients and DispEventUnadvise() doesn't seem to work.

I have a DCOM server which fires events to separate instances of MFC
clients, all of which reside on
separate machines. This all works fine for awhile, however over time, the
server slows down and
takes a long time for the round trip of sending the event to all of it's
client.

I've implemented the client sinks by deriving from IDispEventSimpleImpl<>.
When a client starts up
I call DispEventAdvise(). When a client shuts down, I call
DispEventUnadvise().

I've put some debugging code into the server. It seems that the client count
never decreases even
after calling DispEventUnadvise(). It's all standard ATL connection point
code, so the m_vec.GetSize()
function continues to grow over time and I think what happens is that when
firing events, the server
is firing to clients who are no longer attached, which is why the event
firing is taking a  long time.

I'm wondering how this might happen. From the documentation,
IDispEventSimpleImp<> is supposed to
many the cookies returned to each client, so that they can properly Unadvise
themselves when shutting
down.

Any ideas about what I'm doing wrong?

Thanks,

-TC



Fri, 10 Oct 2003 23:50:23 GMT  
 IDispEventSimpleImpl<> clients and DispEventUnadvise() doesn't seem to work.
Does DispEventUnadvise succeed on the client? Is IConnectionPoint::Unadvise
called on the server?
--
With best wishes,
    Igor Tandetnik


Quote:
> I have a DCOM server which fires events to separate instances of MFC
> clients, all of which reside on
> separate machines. This all works fine for awhile, however over time, the
> server slows down and
> takes a long time for the round trip of sending the event to all of it's
> client.

> I've implemented the client sinks by deriving from IDispEventSimpleImpl<>.
> When a client starts up
> I call DispEventAdvise(). When a client shuts down, I call
> DispEventUnadvise().

> I've put some debugging code into the server. It seems that the client
count
> never decreases even
> after calling DispEventUnadvise(). It's all standard ATL connection point
> code, so the m_vec.GetSize()
> function continues to grow over time and I think what happens is that when
> firing events, the server
> is firing to clients who are no longer attached, which is why the event
> firing is taking a  long time.

> I'm wondering how this might happen. From the documentation,
> IDispEventSimpleImp<> is supposed to
> many the cookies returned to each client, so that they can properly
Unadvise
> themselves when shutting
> down.

> Any ideas about what I'm doing wrong?

> Thanks,

> -TC



Sat, 11 Oct 2003 02:16:31 GMT  
 IDispEventSimpleImpl<> clients and DispEventUnadvise() doesn't seem to work.
Well DispEventUnadvise() returns a success code.
No, I'm not calling IConnectionPoint::Unadvise() on the server. At what
point should I be doing that?
I guess I thought that DispEventUnadvise() was the only Unadvise type call I
needed to make.

Thanks,

-TC



Sat, 11 Oct 2003 06:31:23 GMT  
 IDispEventSimpleImpl<> clients and DispEventUnadvise() doesn't seem to work.
What I mean is DispEventUnadvise() on the client should end up calling
IConnectionPoint::Unadvise on the server, so you can put a breakpoint in
IConnectionPointImpl::Unadvise and check that it is indeed called, and see
why the client connection is not being removed.
--
With best wishes,
    Igor Tandetnik


Quote:
> Well DispEventUnadvise() returns a success code.
> No, I'm not calling IConnectionPoint::Unadvise() on the server. At what
> point should I be doing that?
> I guess I thought that DispEventUnadvise() was the only Unadvise type call
I
> needed to make.

> Thanks,

> -TC



Sat, 11 Oct 2003 06:55:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. <<<<<<<Parsing help, please>>>>>>>>

2. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

3. <<<>>>Need C code advice with functions and sorting.<<<>>>

4. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

5. >>>Windows Service<<<

6. Array Casting doesn't seem to work

7. Encoding.GetEncoding(866) doesn't seem to work for Russian text

8. CDatabase doesn't seem to be working in Release builds

9. DoFieldExchange doesn't seem to like using an inoutParam

10. VC DEBUGGER doesn't seem to work with IE 4.0 on Win95

11. SYSINCL.dat doesn't seem to work in VC7.1

12. Project Settings doesn't seem to be picked up by the compiler

 

 
Powered by phpBB® Forum Software