Re: How to keep my com exe alive?



"shaji" <shajiparemmal@xxxxxxxxx> wrote in message
news:1141820689.598628.253300@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
1. I want to keep my com exe (just one ATL COM object - free threaded
- dual interface) running even after all the clients have quit. But I
don't want to make it a service.

Call _Module.Lock() to keep yourself alive. Call Unlock() when you
finally decide it's time to terminate.

2. When the exe shuts down, I want to save some internal data (in
fact, an stl list) onto the disk so that it can be read when next
time the exe starts up

Override PostMessageLoop in your CAtlExeModule-derived class.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Befor to start to writing a component ...?
    ... - Dual interface is easier since ATL provides ready IDispatch ... Automation dispinterface purely for ease of development (you ... since clients will only query for ...
    (microsoft.public.vc.atl)
  • Pop up report
    ... Can I use a function key to pop up a list of clients from my Client table? ... press Esc to quit the pop up list. ...
    (microsoft.public.access.tablesdbdesign)

Loading