http://bugs.winehq.org/show_bug.cgi?id=58198
Bug ID: 58198 Summary: Wine missing WH_JOURNALPLAYBACK, required by VB SendKeys Product: Wine Version: 8.0 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user16 Assignee: wine-bugs@winehq.org Reporter: jxvhulzowyrobfwwze@nbmbb.com Distribution: ---
Wine doesn’t implement WH_JOURNALPLAYBACK, which is required by the Visual Basic SendKeys function. This makes the game “Mordor: The Depths of Dejenol” unplayable after entering the dungeon.
I’ve confirmed with 32-bit Wine 8 and 16-bit VB3, but the logic seems unchanged in more recent Wine (and VB) versions. Microsoft eventually released a VB6 runtime that reimplemented SendKeys using SendInput instead of WH_JOURNALPLAYBACK, but that only fixes VB6 binaries.
https://archives.miloush.net/michkap/archive/2007/09/10/4850360.html
https://web.archive.org/web/20130615064311/http://blogs.msdn.com/b/michkap/a...
The story gets worse for programs that invoke DoEvents after SendKeys. Since DoEvents “first clears all pending keystrokes from the SendKeys function,” it enters an endless loop waiting for PeekMessage to return the expected WH_JOURNALPLAYBACK messages. CPU usage goes to 100%, and it’s easy to run out of stack space if DoEvents is invoked repeatedly.
https://nolongerset.com/how-doevents-works/
Thankfully, running with WINEDEBUG=warn emits a clear message, “SetWindowsHookEx16 hook type 1 broken in Win16” pointing us to https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/user.exe16/hook.c
This game is particularly creative, using SendKeys as some sort of input filter. Many keyboard and mouse inputs are apparently translated to SendKeys calls. I don’t fully understand the logic, except that the game is unplayable without it.
I can’t say whether it’s worth fixing this or not. At the very least, it’s helpful to know why this game doesn’t work, without having to keep trying each new Wine release.
The free demo of “Mordor: The Depths of Dejenol” can be downloaded from https://www.decklinsdemise.com/mordor.htm