Sending Ctrl+C to Apache
- From: cartoper@xxxxxxxxx
- Date: 1 Feb 2007 16:52:19 -0800
I am in a pickel, I MUST start and stop the apache web server in
console mode. The only way to shut down apache cleaning is by
pressing <Ctrl>+C. I have tried everything I know and I cannot
duplicate that in C# code. This is what I have, which is NOT working:
[DllImport("Kernel32.dll")]
public static extern bool GenerateConsoleCtrlEvent(int ctrlEvent, int
processGroupId);
[DllImport("Kernel32.dll")]
public static extern int GetProcessId(IntPtr Process);
int processID = GetProcessId(process.Handle);
GenerateConsoleCtrlEvent(0, processID);
Of course, process IS the apache service the application started.
Anyone have any more thoughts?
.
- Prev by Date: Re: UI freeze and thread problems
- Next by Date: Which MySQL Provider.
- Previous by thread: Re: Installation and Registry association
- Next by thread: Re: Sending Ctrl+C to Apache
- Index(es):