Right now, I'm using:
TerminateProcess(pi.hProcess, 0)
... but this doesn't allow the application to clean up.
Our application has a wndProc function, but when I send WM_CLOSE...
PostThreadMessage(pi.dwThreadId, WM_CLOSE, 0, 0);
The function doesn't seem to be getting the message.
pi is of type: PROCESS_INFORMATION