Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ ATL COM
Hello,
 
I am working on an application that uses an out-of-process COM server. Even though our code is perfect Smile | :) , there are some instances where the server EXE may crash or be terminated, causing access violations when the client tries to call a method on one of its proxy objects. Is there a good way to determine if the references to these objects are still valid before trying to use them?
 
Try...catch blocks work OK, but I feel like there might be a better way to do this. Thanks in advance!
Posted 22-Nov-11 14:19pm
Comments
Eugen Podsypalnikov at 23-Nov-11 6:25am
   
Hm... A static instance in the server code could call the all connected clients by its destructor... :)
Merlin5p0 at 12-Dec-11 15:09pm
   
Thanks, Eugen. I am testing out a few scenarios with this method and it seems to be working so far!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 CPallini 155
3 PIEBALDconsult 150
4 BillWoodruff 148
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 22 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100