http://bugs.winehq.org/show_bug.cgi?id=26227
Summary: GetClipboardFormatName() / RegisterWindowsMessage(): thoroughly incompatible implementation Product: Wine Version: 1.3.14 Platform: x86 OS/Version: All Status: NEW Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: andi@rhlx01.fht-esslingen.de
GetClipboardFormatName() / RegisterWindowsMessage() and related APIs are said to map to identical functions (RVAs) in Windows.
In Wine, we have individual USER drivers (winex11.drv etc), and they do their _own_ (even non-ATOM) clipboard format handling. And RegisterWindowsMessage() uses GlobalAddAtom() which is said to be WRONG, too.
"Registered Window Message String", http://www.eggheadcafe.com/software/aspnet/30695961/registered-window-messag... clarifies it: both APIs are _identical_, and they make use of _another_ _internal_ ATOM table. I.e., there's the application-global (NULL HINSTANCE?) atom table, application-local (per-HINSTANCE?), and this _system-internal_ table _common_ to both clipboard/messages.
Conclusion: incompatibilities abound (and that in a situation where Google "RegisterWindowMessage GetClipboardFormatName" shows 1850 results, IOW a very widely known undocumented Windows behaviour).
If correcting the implementation is deemed less urgent, then perhaps it's useful to add a corresponding comment at a prominent place, hinting at these implementation specifics (should probably reference this bug#).
HTH,
Andreas
http://bugs.winehq.org/show_bug.cgi?id=26227
--- Comment #1 from Alexandre Julliard julliard@winehq.org 2011-02-24 04:17:45 CST --- Adding a global atom should work just fine. The only potential incompatibility is that GetClipboardFormatName would fail for something that's not actually a clipboard format. Please show us an app that depends on this.
http://bugs.winehq.org/show_bug.cgi?id=26227
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|All |other
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2011-02-24 04:20:20 CST --- Is this a pure theoretical speculation or there is an application that doesn't work correctly?
http://bugs.winehq.org/show_bug.cgi?id=26227
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-08 23:13:15 CST --- No response, and apparently there is no application misbehaving due to that.
http://bugs.winehq.org/show_bug.cgi?id=26227
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-08 23:13:45 CST --- Feel free to reopen if there are arguments to.