I believe I'm missing something here, I am using
This works and requires a control break to close the window however
When I use this to terminate the process
The process ID returned by CreateProcess appears to be invalid (that's what windows complains at least). Thoughts as to WHY they are invalid?
I have th current manually send CTRL break to them (currently there are 6 tolerable but I prefer not to sift through processes and CTRL-BREAK in there window personally).
I attempted originally to use TerminateProcess but that appears to have other issues (first you have to do all sorts of security twiddling) this seemed the better route.
Side note What is it with MS and NON STANDARD interfaces? There is no SIGINT support yet it exists in there API information and yet they don't actually support it. I suppose it's because of the redefinition of CTRL ALT DEL (yet another genius idea).
Anyhow
Cyb
Code:
CreateProcess
(
NULL,//"cmd.exe", // include module name
cmd_line.c_str(), // use generated command line
NULL, // Process handle not inherited
NULL, // Thread handle not inherited
FALSE, // handle inheritance is false
CREATE_NEW_PROCESS_GROUP,
// make a process group for CTRL BREAK To terminate it
NULL, // use parent environment
NULL, // use parent starting directory
&start_information,
&com_process[index]
)
When I use this to terminate the process
Code:
if(!GenerateConsoleCtrlEvent
(
CTRL_BREAK_EVENT,
//com_process[index].hProcess
com_process[index].dwProcessId
)
)
I have th current manually send CTRL break to them (currently there are 6 tolerable but I prefer not to sift through processes and CTRL-BREAK in there window personally).
I attempted originally to use TerminateProcess but that appears to have other issues (first you have to do all sorts of security twiddling) this seemed the better route.
Side note What is it with MS and NON STANDARD interfaces? There is no SIGINT support yet it exists in there API information and yet they don't actually support it. I suppose it's because of the redefinition of CTRL ALT DEL (yet another genius idea).
Anyhow
Cyb