[Bug 13994] Dungeon Keeper 2 Demo does not start with WinVer set to 'Windows XP' or higher (broken game, requires VirtualRegistry appcompat shim)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Mar 30 11:45:33 CDT 2014


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

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
            Summary|Dungeon Keeper 2 Demo does  |Dungeon Keeper 2 Demo does
                   |not start                   |not start with WinVer set
                   |                            |to 'Windows XP' or higher
                   |                            |(broken game, requires
                   |                            |VirtualRegistry appcompat
                   |                            |shim)

--- Comment #15 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming XP+ behaviour.

Like other Bullfrog games, DKII is broken for XP+ systems and therefore needs
compat mode with multiple app shims/tweaks applied.
Search for "Dungeon Keeper 2: How to run under XP/Vista/Win7" and you get some
howtos (run in compat mode, tweak some settings).

The game uses different code paths for Win9X and NT systems in several places
so the point of failure was not obvious.

The reason why Henri's hack works is most likely this trace log snippet.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Bullfrog/Dungeon Keeper 2 Demo

$ WINEDEBUG=+tid,+seh,+relay,+reg,+server wine ./DK2Demo.exe >>log.txt 2>&1
...
0009:Call advapi32.RegOpenKeyExA(80000002,006bd72f
"Software\\Microsoft\\DirectX",00000000,00000000,0033cc88) ret=005b2e19
0009:trace:reg:NtOpenKey (0x1c,L"Software\\Microsoft\\DirectX",0,0x33cc88)
0009: open_key( parent=001c, access=00000000, attributes=00000000,
name=L"Software\\Microsoft\\DirectX" )
0009: open_key() = 0 { hkey=022c }
0009:trace:reg:NtOpenKey <- 0x22c
0009:Ret  advapi32.RegOpenKeyExA() retval=00000000 ret=005b2e19

0009:Call advapi32.RegQueryValueExA(0000022c,006bd714
"Version",00000000,0033cc8c,00000000,00000000) ret=005b337e
0009:trace:reg:RegQueryValueExA (0x22c,"Version",(nil),0x33cc8c,(nil),(nil)=0)
0009:trace:reg:NtQueryValueKey (0x22c,L"Version",2,0x33cab8,256)
0009: get_key_value( hkey=022c, name=L"Version" )
0009: get_key_value() = ACCESS_DENIED { type=0, total=0, data={} }
0009:Ret  advapi32.RegQueryValueExA() retval=00000005 ret=005b337e

0009:Call advapi32.RegOpenKeyA(0000022c,006bd714 "Version",0033cc84)
ret=005b339b
0009:trace:reg:NtOpenKey (0x22c,L"Version",2000000,0x33cc84)
0009: open_key( parent=022c, access=02000000, attributes=00000000,
name=L"Version" )
0009: open_key() = OBJECT_NAME_NOT_FOUND { hkey=0000 }
0009:trace:reg:NtOpenKey <- (nil)
0009:Ret  advapi32.RegOpenKeyA() retval=00000002 ret=005b339b

0009:Call advapi32.RegOpenKeyExA(80000002,006bd6c3
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DirectXDrivers",00000000,00000000,0033cc88)
ret=005b2e19
0009:trace:reg:NtOpenKey
(0x1c,L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DirectXDrivers",0,0x33cc88)
0009: open_key( parent=001c, access=00000000, attributes=00000000,
name=L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DirectXDrivers"
)
0009: open_key() = OBJECT_NAME_NOT_FOUND { hkey=0000 }
0009:trace:reg:NtOpenKey <- (nil)
0009:Ret  advapi32.RegOpenKeyExA() retval=00000002 ret=005b2e19
0009:Call advapi32.RegCloseKey(0000022c) ret=005b2dc0
0009: close_handle( handle=022c )
0009: close_handle() = 0
0009:Ret  advapi32.RegCloseKey() retval=00000000 ret=005b2dc0 
...
--- snip ---

RegQueryValueExA() requires KEY_QUERY_VALUE rights.
Some 'genius' passed zero 'samDesired' to RegOpenKeyExA() which obviously can't
work.
The follow-up RegOpenKeyA() and RegOpenKeyExA() calls are meaningless, there is
no way to produce a 'success' result after the first failure.

The compat mode probably enables a specific VirtualRegistry fix/shim which just
works around this broken code, getting it onto the right code path again.
Unfortunately you won't get this demo run in Windows XP/7 with compat mode
because the shims filter for production executables signatures to apply shims
to (and not demos).

$ sha1sum DungeonKeeper2Demo.exe 
a3a2af7d8419499780d835e661b864d477fd3ece  DungeonKeeper2Demo.exe

$ du -sh DungeonKeeper2Demo.exe 
46M    DungeonKeeper2Demo.exe

$ wine --version
wine-1.7.15-112-g2aad5d7

Regards

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