Kurapica Posted August 31, 2017 Posted August 31, 2017 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 1
mrexodia Posted August 31, 2017 Posted August 31, 2017 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); } 1
Kurapica Posted August 31, 2017 Author Posted August 31, 2017 very close to what I used in this silly plugin, imitating a CTRL click. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now