How to keep my com exe alive?
- From: "shaji" <shajiparemmal@xxxxxxxxx>
- Date: 8 Mar 2006 04:24:49 -0800
Hi all,
I've got two problems.
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.
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
In order to solve the first issue, I just incremented the refcount
variable (m_dwRef) in the FinalConstruct() function so that the
reference count does not become 0 even when the last client releases
the interface. But now the problem is that, I don't know when the exe
shuts down.
How can I trap the WM_QUIT message in the ATL COM exe? I am using
VS2005 for development and the exemodule class does not contain
lifetime management code.
Can I use persistence mechanism to save the internal data in the exe?
Thanks in advance,
Shaji.
.
- Follow-Ups:
- Re: How to keep my com exe alive?
- From: Igor Tandetnik
- Re: How to keep my com exe alive?
- Prev by Date: Re: When I sleep, why does WebBrowser sleep too?
- Next by Date: Re: How to keep my com exe alive?
- Previous by thread: IDispEventImpl
- Next by thread: Re: How to keep my com exe alive?
- Index(es):
Relevant Pages
|
Loading