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?