if(strcmp(pe32.szExeFile, "Apache.exe")==0){
hProcess = OpenProcess( SYNCHRONIZE , FALSE, pe32.th32ProcessID );
if( hProcess == NULL ){
printError( TEXT("OpenProcess") );
}else
{
dwPriorityClass = GetPriorityClass( hProcess );
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);
}
WaitForInputIdle(piA.hProcess, INFINITE);
while(WaitForSingleObject(piA.hProcess, 10000) == WAIT_TIMEOUT) {
}
WaitForInputIdle(hProcess, INFINITE);
while(WaitForSingleObject(hProcess, 2000) == WAIT_TIMEOUT) {
}
CloseHandle( hProcess );
}
}