Answer the question
In order to leave comments, you need to log in
Send ctrl-c event via win32 api?
Hi
I have little experience with win32 api. The problem is that under windows I need to send ctrl-c to the console process (there is a pid) so that it turns off normally. Those. kill pid simulator under unix. Ideally, I need a program (or source code). With Windows, you can't do this.
Thanks
Answer the question
In order to leave comments, you need to log in
GenerateConsoleCtrlEvent(...) if you still want to send ctrl-c. OpenProcess(...) + TerminateProcess(...) if just terminate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question