How to keep my com exe alive?



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.

.



Relevant Pages

  • Re: exporting functions/subs from fortran?
    ... Implicit in the tlb approach that I mentioned is that the 'exe' has no ... > It's nice to hear other developers with your caliber exist. ... >> So your clients are developers. ... >> stick with a classic CVF DLL with exports. ...
    (comp.lang.fortran)
  • Re: FoxPro is a frustrating and very user unfriendly
    ... > DO FORM XYZ ... When I compile my program for the final exe, ... >> methods prg code from the forms and classes. ... >> very infrequent even with my Win 98 clients). ...
    (microsoft.public.fox.programmer.exchange)
  • Re: FoxPro is a frustrating and very user unfriendly
    ... Your mention of modal forms jarred a memory loose. ... DO FORM XYZ ... When I compile my program for the final exe, ... > since ANY of my clients have mentioned this error (this could also be due ...
    (microsoft.public.fox.programmer.exchange)
  • Re: FoxPro is a frustrating and very user unfriendly
    ... When I compile my program for the final exe, I remove all the methods prg ... further migration to XP but it's very infrequent even with my Win 98 clients). ... I've experienced specific method code corruption issues in VFP6 quite a ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Expiration Date
    ... > I have a program which are deployed to our clients. ... to make it at least as difficult as cracking an .exe (machine code)? ... (removing some "checkExpiration()" method and recompile the class, ...
    (comp.lang.java.programmer)

Loading