while(ProcessId==0)
{
Sleep10;
ProcessId=FindProcessId("someapplication");
if(inkey()[0]!=0)
{
fflush(stdout);
ExitProcess(0);
}
}
hProcess=OpenProcess(PROCESS_ALL_ACCESS,FALSE,ProcessId);
TerminateProcess(hProcess,0);
CloseHandle(hProcess);
ProcessId=0;
while(ProcessId==0)
{
Sleep10;
ProcessId=FindProcess("someapplication");
if(inkey()[0]!=0)
{
fflush(stdout);
ExitProcess(0);
}
}
is there any possibility for me to rechange Findprocess to FindWindow by editing this line ~>ProcessId=FindProcess("someapplication"); to ProcessId=FindWindow(NULL, La La La");