[Bug 14784] New: SetWindowHookEx fails to inject DLL conatining the HookProc if...

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Aug 6 21:58:30 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=14784

           Summary: SetWindowHookEx fails to inject DLL conatining the
                    HookProc if...
           Product: Wine
           Version: 1.1.2
          Platform: All
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: user32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: hongbo at njstar.com


SetWindowHookEx fails to inject DLL conatining the HookProc into another
process if the DLL is linked with another DLL in the same directory which is
not on PATH.

Suppose DLLA_GetMsgProcis is in A.DLL, and A.dll is linked to B.dll, with those
code:

hwnd = FindWindow("Notepad",NULL);
idThread = GetWindowThreadProcessId(hwnd, NULL);
SetWindowsHookEx(WH_GETMESSAGE, DLLA_GetMsgProc, hinst, idThread );

SetWindowsHookEx will fail because it can not load B.dll which is imported by
A.dll.

If hwnd is created by current process, there is no problem. But in above code,
Notepad is not the current process.

I have created a simplest test application (attached) with source and compiled
exe/dll to show the above bug on wine.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list