
IntPtr hWnd = FindWindow(NULL,"Modern Warfare 2"); //Im sure there's a better way to do this... but I dont remember now... uint processId; GetWindowThreadProcessId(hWnd, out processId);
while(NotFound(ProcessHandle())) {
FindProcessHandle();
}

Well, try to do this.