harryjkuhar
July 2nd, 2006, 11:36 PM
I am controlling GDB through a System::Diagnostics::Process
I want to send ctrl-c to the process in order to break execution. Is there any way to send ctrl-c to the process with .net
NoHero
July 3rd, 2006, 10:55 AM
Sending Ctrl+C can also be achived by writing the hexadecimal values of Ctrl+C (also known as ^C) to the process' input stream. Check this (http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tfr/cfrgtapp.htm) link for Ctrl+<KEY> sequences, their meanings and their values.
harryjkuhar
July 3rd, 2006, 05:40 PM
This does not work. It seems that console apps some how interpret ctrl+c differently. I have tried sending 0x03 to stdin, I have also tried the following
PostMessage(Temp,0x100,0x11,0x401D0001);
PostMessage(Temp,0x100,0x43,0x002E0001);
this causes cmd.exe to display a c at the prompt
and
PostMessage(Temp,0x102,0x03,0x002E0001);
this causes cmd.exe to display a ^C at the prompt
I am unable to use spy++ to view messages to cmd.exe does anyone know of a tool to trap messages to cmd.exe