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("Kern el32.dll")]
public static extern bool GenerateConsole CtrlEvent(int ctrlEvent, int
processGroupId) ;
[DllImport("Kern el32.dll")]
public static extern int GetProcessId(In tPtr Process);
int processID = GetProcessId(pr ocess.Handle);
GenerateConsole CtrlEvent(0, processID);
Of course, process IS the apache service the application started.
Anyone have any more thoughts?
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("Kern el32.dll")]
public static extern bool GenerateConsole CtrlEvent(int ctrlEvent, int
processGroupId) ;
[DllImport("Kern el32.dll")]
public static extern int GetProcessId(In tPtr Process);
int processID = GetProcessId(pr ocess.Handle);
GenerateConsole CtrlEvent(0, processID);
Of course, process IS the apache service the application started.
Anyone have any more thoughts?
Comment