[Qt-interest] HINSTANCE from QLibrary ?
Lars Amsel
lars.amsel at signalion.com
Wed Aug 12 07:25:16 CEST 2009
Martin Schreiber wrote:
> Hello,
>
> i'd like to register a Windows-Systemhook from within my QT-application.
> The call for registering looks like this :
>
> hHookProc = SetWindowsHookEx(WH_KEYBOARD_LL,&hookFunc,hLibrary,NULL);
>
> where hLibrary is a handle (HINSTANCE) from a previously loaded DLL.
> Loading the library via the QLibrary-Class ist very convenient but i
> haven't found a way to get a HINSTANCE for the library itself.
There is a method in the WinAPI called GetModuleHandle
(http://msdn.microsoft.com/en-us/library/ms683199(VS.85).aspx) that returns a
HMODULE. This is the HINSTANCE of the library.
regards
Lars
More information about the Qt-interest-old
mailing list