if(strcmp(pe32.szExeFile, "Apache.exe")==0){
MessageBox(NULL, pe32.szExeFile, "", MB_OKCANCEL);
hProcess = OpenProcess( PROCESS_CREATE_PROCESS, FALSE, pe32.th32ProcessID );
if( hProcess == NULL ){
printError( TEXT("OpenProcess") );
}else
{
MessageBox(NULL, "ungelcih null", "", MB_OKCANCEL);
dwPriorityClass = GetPriorityClass( hProcess );
/*if( !dwPriorityClass )
//printError( TEXT("GetPriorityClass") );
MessageBox(NULL, "GetPriorityClass", "", MB_OKCANCEL);
*/
PROCESS_INFORMATION piA;
STARTUPINFO suiA;
suiA.cb =sizeof(STARTUPINFO);
suiA.lpReserved =0;
suiA.lpDesktop =NULL;
suiA.lpTitle =NULL;
suiA.dwX =0;
suiA.dwY =0;
suiA.dwXSize =0;
suiA.dwYSize =0;
suiA.dwXCountChars =0;
suiA.dwYCountChars =0;
suiA.dwFillAttribute =0;
suiA.dwFlags =STARTF_USESHOWWINDOW;
suiA.wShowWindow =SW_MINIMIZE;
suiA.cbReserved2 =0;
suiA.lpReserved2 =0;
if(CreateProcess(NULL,strApacheShutdown,NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE|NORMAL_PRIORITY_CLASS,NULL,NULL,&suiA,&piA)==TRUE) {
CloseHandle(piA.hThread);
}
else {
//exit(-1);
}
WaitForInputIdle(piA.hProcess, INFINITE);
while(WaitForSingleObject(piA.hProcess, 10000) == WAIT_TIMEOUT) {
}
WaitForInputIdle(hProcess, INFINITE);
while(WaitForSingleObject(hProcess, 10000) == WAIT_TIMEOUT) {
}
//MessageBox(NULL, "weiter", "", MB_OKCANCEL);
if(CloseHandle( hProcess )==0){
// MessageBox(NULL, "nicht beendet", "", MB_OKCANCEL);
}else{
// MessageBox(NULL, "beendet", "", MB_OKCANCEL);
}
//MessageBox(NULL, "weiter", "", MB_OKCANCEL);
}
if( dwPriorityClass ){
_tprintf( TEXT("\n Priority class = %d"), dwPriorityClass );
}
// List the modules and threads associated with this process
ListProcessModules( pe32.th32ProcessID );
ListProcessThreads( pe32.th32ProcessID );
}