[Bug 20699] New: Something wrong with WH_GETMESSAGE hook (TeamViewer)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 14 07:38:59 CST 2009


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

           Summary: Something wrong with WH_GETMESSAGE hook (TeamViewer)
           Product: Wine
           Version: 1.1.33
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: user32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: gabmoa at yahoo.it


TeamViewer 3 with OS=NT4.0 to workaround bug 12067
All seems to work (except for the unrelated bug 11727) but the chat the other
windows seems to loop (when a connection is active) when many input messages
are sent on this windows (for example when you press 2 or more keys on the
chat). Obviously in windows there aren't problems.

To workaround this in then dlls/user32/message.c

...
break;
case MSG_HARDWARE:
if (size >= sizeof(msg_data->hardware))
{
  ... 
  HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg,
TRUE );
  return TRUE;
}
...


I add this check (or you can remove the whole call...)

...
if (flags & PM_REMOVE)   <-
HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg, TRUE 
...

and now there aren't problems and it works very well.
I know the patch isn't right, since the WH_GETMESSAGE should return also the
not removed peeked messages but I think there is something wrong with the
hooking system!
Note:
To understand what Teamviewer do I have followed the source code VNCHooks.dll
'cause it's very similar (also with the name and meanings of the registerd
messages).

-- 
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