How do I activate one process from another?
Posted on 1998-05-08
I've got two applications (a master and a slave) written in MSVC++ 5.0 running under NT 4.0. I've used CreateProcess to launch the slave from the master and now I'm trying to activate the slave from the master. I've tried using a custom message that uses SetActiveWindow to activate the slave process' main window, but that crashed and burned the slave process. i've also tried:
WPARAM iParam = WA_ACTIVE;
PostThreadMessage( tProcInfo.dwThreadId, WM_ACTIVATE,
iParam, 0 );
from the master, but that did nothing. tProcInfo.dwThreadId is the id of the main thread of the slave.