Menu

SetWindowsHookEx(KEYBOARD) failed.. moving all dockable windows

2014-04-16
2014-05-05
  • Andrzej Kmicic

    Andrzej Kmicic - 2014-04-16

    This question is asked on the forum for bugs in plugins. This Problem does not concern only the plug-ins but all dockable Windows in Notepad + +.
    In some installations, Windows7 what any docking attempt ends in failure with the message system on SetWindowsEx or gripper starter error (createwindowsEx grip).

    This is very strange. On my Win7 is installed the last current version Notepad++ and there is no problem. At my friend (who always advises me when trouble) how any contact of the mouse ends (for docked any dockable windows /example character table/) generate the same error.

    Please respond and help me, what is this error and how to fix this.

    regards
    Wojtek Jarzęcki

     
  • Loreia2

    Loreia2 - 2014-04-16

    Hi Wojtek,

    it looks like some sort of Windows XP issue. This is the code that fails:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if (ver < WV_VISTA)
    {
    hookKeyboard = ::SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)hookProcKeyboard, _hInst, 0);
    if (!hookKeyboard)
    {
    DWORD dwError = ::GetLastError();
    TCHAR str[128];
    ::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
    ::MessageBox(NULL, str, TEXT("SetWindowsHookEx(KEYBOARD) failed"), MB_OK | MB_ICONERROR);
    }
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Can you copy here entire message, it would be really helpful to see windows error code.

    BR,
    Loreia

     
  • Andrzej Kmicic

    Andrzej Kmicic - 2014-04-21

    Wow ...

    Where this fragment to paste codes?. This error is not related to the any plugin. Each dockable window in Notepad ++ after touched the mouse generates an error and the system hangs.
    If you have the tools to build N + and you could do for me with this code that you pasted and this compilation it please share the exe file on the Web (link).
    or send link to adress. l o t t o c a d (a t) g m a i l (d o t) c o m

    Please


    thanks
    Wojtek

     
  • Don HO

    Don HO - 2014-05-05

    This issue is fixed here:
    http://notepad-plus-plus.org/tmp/npp.zip

    Could you confirm me if this issue is fixed for you?

    Don