COM Doubt(urgent)....


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. )



  • 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.

Howdy, Stranger!

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


In this Discussion