The console program, in turn, uses other programs that it controls. It does not open any additional windows, but the only way to stop it when it is running, is by either closing the console window or using CTRL+C, which signals a save and close routine within the executable. TerminateProcess() will close the program (and console window, except when it is running some of the other programs. Unfortunately, the programs I need to cancel during, are ones that can run several days, depending on the numbers being worked with, so I can't really let it take its time after I call TerminateProcess().
Here's my CreateProcess:
STARTUPINFO info={sizeof(info)};
PROCESS_INFORMATION processInfo;
ZeroMemory( &info, sizeof(info) );
info.cb = sizeof(info);
info.dwX = 0;
info.dwY = 300;
info.dwFlags = STARTF_USEPOSITION;
CreateProcess(NULL, aliqueitCall, NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo);
Here's my TerminateProcess:
TerminateProcess(processInfo.hProcess, 0);
Take Care,
Ed