Shutdown myself? ie shutdown a COM Server 
Author Message
 Shutdown myself? ie shutdown a COM Server

Hello

I want to have a method calld ShutMeDown which can be called to shutdown
itself (the COM server).

However, I can foresee problems shutting down myself?

So an idea I had was to have a method which set off a separate thread which
perhaps waited a moment and then shut itself down.   This way the method
returns to the caller and rthen closes itself down.  Would this work?  Is
this the best way of doing this?  If not what is the best way?  Is it
possible?

Any help would be much appreciated.

Angus Comber



Sat, 26 Feb 2005 04:33:44 GMT  
 Shutdown myself? ie shutdown a COM Server
Usually, out-of-proc COM server automatically shuts itself down when all
objects it serves are released. ATL Wizard sets up the server this way,
exactly by creating a watchdog thread. Why do you need a special method?
What is going to happen to other clients that may still hold interface
pointers into your server when it closes itself?
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hello

> I want to have a method calld ShutMeDown which can be called to
shutdown
> itself (the COM server).

> However, I can foresee problems shutting down myself?

> So an idea I had was to have a method which set off a separate thread
which
> perhaps waited a moment and then shut itself down.   This way the
method
> returns to the caller and rthen closes itself down.  Would this work?
Is
> this the best way of doing this?  If not what is the best way?  Is it
> possible?

> Any help would be much appreciated.

> Angus Comber




Sat, 26 Feb 2005 04:40:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to shutdown COM server without shutting down process

2. Shutdown EXE COM Server

3. How to shutdown NT service when OS is shutdown

4. delaying shutdown untill service is done handling shutdown message

5. How to shutdown NT service when OS is shutdown

6. ATL local server shutdown question

7. Auto-shutdown for an exe server.

8. Catching Windows Shutdown in Out-Of-Proc server

9. Auto shutdown of atl automation server??

10. SQL server shutdown while live OBDC connections.

11. CSocket , Server Shutdown, Client Receive problem

12. Catching SQL Server shutdown in ODBC app

 

 
Powered by phpBB® Forum Software