Posted August 31, 20178 yr The idea of this plugin is simple and was born out an agony I went through while using x64dbg with IDA simultaneously. It solves the problem of stealing the window focus from x64dbg to IDA, each time you single-step in the debugger, the sync plugin in x64dbg will send the sync info to IDA to show the current location and this makes IDA get the focus, very annoying when you are doing a quick single stepping ! This plugin simply restores the focus to the debugger, that's all. Flock_32_64.rar
August 31, 20178 yr Alright, here is some more stable code for forcing another foreground window (this one supposedly sometimes holds CTRL): //https://www.codeproject.com/Tips/76427/How-to-bring-window-to-top-with-SetForegroundWindo static void SetForegroundWindowInternal(HWND hWnd) { if(!hWnd || !IsWindow(hWnd)) return; //to unlock SetForegroundWindow we need to imitate pressing [Alt] key bool bPressed = false; if((GetAsyncKeyState(VK_MENU) & 0x8000) == 0) { bPressed = true; keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | 0, 0); } SetForegroundWindow(hWnd); if(bPressed) keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); }
Create an account or sign in to comment