I’m using the CreateProcess API with the CREATE_NEW_CONSOLE option, since I want the app to be opened in a new window.
When I call TerminateProcess, it doesn’t close the window right away, but rather with a delay. Is it possible to somehow force it to close the window straight away?
I’m currently running on Windows7 64bit, but the program I’m working on shouldn’t be dependent on the WIN version.
I wanted to use CREATE_NEW_CONSOLE so that the main window won’t be hijacked by the new application.
I tried to reproduce the issue with
CREATE_NEW_CONSOLEflag.No delays in termination process.
Try use procmon to figure out where delay occur in your case.