c# how to send a ctrl-C signal programatically to a process?

  • Thread starter Thread starter carmen
  • Start date Start date
C

carmen

Hi,

I have searched through msdn documentation, but couldnt figure this
out. I have written a console application that starts a process using
the Process class in system.diagnostics namespace. I want to send a
ctrl-C signal to this process from my application. Can anyone help me
on this?

Thanks,
Carmen
 
I have searched through msdn documentation, but couldnt figure this
out. I have written a console application that starts a process using
the Process class in system.diagnostics namespace. I want to send a
ctrl-C signal to this process from my application. Can anyone help me
on this?


I don't think you'll find a menaged method for that. But you can use
the native API GenerateConsoleCtrlEvent.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top