How to signal process

  • Thread starter Thread starter William Stacey [MVP]
  • Start date Start date
W

William Stacey [MVP]

How can you signal Ctrl-C to a managed process (i.e. process is hosting
cmd.exe)? TIA
 
Thanks Mattias. Know how to get the "dwProcessGroupId ", when all I have is
the Process.Id ? TIA

--
William Stacey [MVP]

|
| >How can you signal Ctrl-C to a managed process (i.e. process is hosting
| >cmd.exe)?
|
| If I understand the question correctly, you can call
| GenerateConsoleCtrlEvent(CTRL_C_EVENT). It should work for any console
| process, managed or not.
|
|
http://msdn.microsoft.com/library/en-us/dllproc/base/generateconsolectrlevent.asp
|
|
| Mattias
|
| --
| Mattias Sjögren [C# MVP] mattias @ mvps.org
| http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
| Please reply only to the newsgroup.
 
Back
Top