Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Closing CreateProcess() Window
I'm working on a win32 application that opens a console program using CreateProcess(). I can close the console window later using TerminateProcess(), but it doesn't close until it wants to. I would lke to do an unconditional close, like when I click on the upper right close icon. The window also closes via a CTRL+C, but not by using SetFocus() and keybd_event(). I have also tried OpenProcess(DELETE, FALSE, processInfo.dwProcessId); which succeeded in acquiring a handle, but did not delete the process. I am unable to figure out if it is a security attribute problem or something else.
Thanks for any help.
0 · ·