https://bugs.winehq.org/show_bug.cgi?id=43727
--- Comment #8 from gamiljydcome@gmail.com --- copy native msls31 riched20 dll to the exe directory, only enable native version, start command is:
WINEDEBUG=+all WINEDLLOVERRIDES="msls31,riched20=n" WINEPREFIX=~/tmpfs/wine-test wine Thunder.exe &> mylog
the app will abort due to not load native riched20 from app directory. following output logs from "grep -i rcihed mylog":
----------------------------------------- 64436.047:002a:002b:Call KERNEL32.GetModuleHandleW(009ccef0 L"RICHED20.dll") ret=008eb30d 64436.047:002a:002b:trace:actctx:RtlFindActivationContextSectionString 00000001 (null) 2 L"RICHED20.dll" 0x34e220 64436.048:002a:002b:trace:file:RtlDosPathNameToNtPathName_U (L"Z:\tmp\Thunder\Program\RICHED20.dll",0x34e0d8,(nil),(nil)) 64436.048:002a:002b:trace:file:RtlGetFullPathName_U (L"Z:\tmp\Thunder\Program\RICHED20.dll" 520 0x34de78 (nil)) 64436.050:002a:002b:trace:file:wine_nt_to_unix_file_name L"\??\Z:\tmp\Thunder\Program\RICHED20.dll" -> "/home/jiangyd/tmpfs/wine-test/dosdevices/z:/tmp/Thunder/Program/riched20.dll" 64436.052:002a:002b:trace:file:RtlGetFullPathName_U (L"Z:\tmp\Thunder\Program\RICHED20.dll" 256 0x34e2c0 0x34e20c) 64436.053:002a:002b:trace:module:LdrGetDllHandle L"RICHED20.dll" -> (nil) (load path L"Z:\tmp\Thunder\Program;.;C:\windows\system32;C:\windows\system;C:\windows;/home/jiangyd/wine/kvm-win2003/xp\8f6f\4ef6/\5907\7528dll;C:\windows\system32;C:\windows;C:\windows\system32\wbem") 64436.053:002a:002b:Call shlwapi.PathAppendW(0034e4d8 L"C:\windows\system32",009ccf0c L"RICHED20.dll") ret=0089761f 64436.053:002a:002b:trace:shell:PathAppendW (L"C:\windows\system32",L"RICHED20.dll") 64436.053:002a:002b:trace:shell:PathIsUNCW (L"RICHED20.dll") 64436.053:002a:002b:trace:shell:PathCombineW (0x34e4d8,L"C:\windows\system32",L"RICHED20.dll") 64436.053:002a:002b:trace:shell:PathIsRelativeW (L"RICHED20.dll") 64436.053:002a:002b:trace:shell:PathCanonicalizeW (0x34e4d8,L"C:\windows\system32\RICHED20.dll") 64436.053:002a:002b:Call KERNEL32.GetFullPathNameW(0034e4d8 L"C:\windows\system32\RICHED20.dll",00000104,0034e084,0034e074) ret=00402af2 64436.053:002a:002b:trace:file:RtlGetFullPathName_U (L"C:\windows\system32\RICHED20.dll" 520 0x34e084 0x34e074) 64436.053:002a:002b:Call msvcr90._wcslwr(0034e28c L"RICHED20.dll") ret=00402b23 64436.055:002a:002b:Call shlwapi.PathFindExtensionW(0034e4d8 L"C:\windows\system32\RICHED20.dll") ret=00402b95 64436.055:002a:002b:trace:shell:PathFindExtensionW (L"C:\windows\system32\RICHED20.dll") 64436.057:002a:002b:Call KERNEL32.LoadLibraryExW(0034e4d8 L"C:\windows\system32\RICHED20.dll",00000000,00000000) ret=00402a31 64436.058:002a:002b:trace:module:load_dll looking for L"C:\windows\system32\RICHED20.dll" in L"Z:\tmp\Thunder\Program;.;C:\windows\system32;C:\windows\system;C:\windows;/home/jiangyd/wine/kvm-win2003/xp\8f6f\4ef6/\5907\7528dll;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 64436.058:002a:002b:trace:file:RtlDosPathNameToNtPathName_U (L"C:\windows\system32\RICHED20.dll",0x34e1c0,0x34e1bc,(nil)) 64436.058:002a:002b:trace:file:RtlGetFullPathName_U (L"C:\windows\system32\RICHED20.dll" 520 0x34df48 0x34e1bc) 64436.059:002a:002b:trace:ntdll:FILE_CreateFile handle=0x34e264 access=80100000 name=L"\??\C:\windows\system32\RICHED20.dll" objattr=00000040 root=(nil) sec=(nil) io=0x34e1c8 alloc_size=(nil) attr=00000000 sharing=00000005 disp=1 options=00000060 ea=(nil).0x00000000 64436.384:002a:002b:trace:file:wine_nt_to_unix_file_name L"\??\C:\windows\system32\RICHED20.dll" -> "/home/jiangyd/tmpfs/wine-test/dosdevices/c:/windows/system32/riched20.dll" 002b: create_file( access=80100000, sharing=00000005, create=1, options=00000060, attrs=00000000, objattr={rootdir=0000,attributes=00000040,sd={},name=L""}, filename="/home/jiangyd/tmpfs/wine-test/dosdevices/c:/windows/system32/riched20.dll" ) 64436.388:002a:002b:trace:module:get_load_order looking for L"C:\windows\system32\RICHED20.dll" 64436.389:002a:002b:trace:module:get_load_order_value got environment n for L"RICHED20" 64436.390:002a:002b:trace:module:load_dll L"C:\windows\system32\RICHED20.dll" is a fake Wine dll 64436.390:002a:002b:warn:module:load_dll Failed to load module L"C:\windows\system32\RICHED20.dll"; status=c0000135 -----------------------------------------
copy them to c:\windows\system32 runs ok with the same command.
more complete log part from mylog as attachment.