shuting down a exe
I have a exe, this exe also exposes a com interface.
This interface could be instanciated with CoCreateInstance and used. When you create this interface it creates a new process to run.
I'm having problems shuting down this process. My interface has a method called Quit which supposed to shut down the process with
AfxGetMainWnd()->PostMessage(WM_CLOSE, 0, 0);
it is not shutting down the process, I'm I missing something?
Thanks
[486 byte] By [
IndikaNiva] at [2007-11-20 10:49:48]

# 1 Re: shuting down a exe
You say, the interface spawns a new process.
So, the post message should be done on the new process' main window and not it's own main window.
As I see, there are 3 components
1. Component A CoCreateInstance component B which is implemented in say B.exe
2. Component B creates a new process C.exe
3. Component A calls Quit method on B and B should post message on C.exe's main window