Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

COM Doubt(urgent)....

anuragvsanuragvs Posts: 5Member
Hi,

We have a situation like this

We have an OLE automation server which is an MDI application.(DNR). and a client application which automates the server.

[ This is very simple like we are writing an Automation client for excel.]

From the client application we create server object and created/get internal objects of server.

Same time user can close the server application window by clicking the CLOSE button or FILE/EXIT.

How the client knows the server is exited. Is there any standard method in COM to handle this situation?

(We prefer catching an error in client side. rather than modifying server code. )


regards


Comments

  • LordCyraxLordCyrax Posts: 2Member
    Does OLE server object disappears when you close the automation server application? It shouldn't. OLE server objects as any other type of COM objects are created when clients request for them and they cannot be destroyed until IUnknown::Release() is called whether the application is closed or not. If you want to know exactly if the server application is closed and don't want to change server code then you may use FindWindow() when necessary. If the window cannot be found the application is closed.


Sign In or Register to comment.