S
S
Stasik02011-05-06 10:40:59
API
Stasik0, 2011-05-06 10:40:59

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

1 answer(s)
R
Roman Abdulmanov, 2011-05-06
@NevRA

GenerateConsoleCtrlEvent(...) if you still want to send ctrl-c. OpenProcess(...) + TerminateProcess(...) if just terminate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question