http://bugs.winehq.org/show_bug.cgi?id=3689
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #33 from Anastasius Focht focht@gmx.net 2008-12-08 17:27:59 --- Hello,
random pick, fortunately I got hold of some Office 97 copy ... ;-) The main problem is Office 97 installer shipping its own version of ole automation library "oleaut32.dll" which is dynamically loaded at install time using a different library alias -> "32autole.dll".
This only happens for installation/registration purpose of "Microsoft Access Wizard Control Library" -> "ACCWIZ.DLL".
--- snip Setup\ACME.LST --- [Windows 95 Files] ... os\system\oleaut32.dll = 32autole.dll
[NT3.51 Intel Files] ... os\system\oleaut32.dll = 32autole.dll --- snip Setup\ACME.LST ---
In installer OS\system dir:
--- snip --- $ls -l OS/SYSTEM/OLEAUT32.DLL -rw-rw-r-- 1 focht focht 491792 1996-11-21 11:37 OS/SYSTEM/OLEAUT32.DLL --- snip ---
When "accwiz.dll" is loaded, DllRegisterServerEx("32autole.dll") is called.
--- snip --- 0024:Call KERNEL32.LoadLibraryExA(0033f7e8 "C:\windows\system32\ACCWIZ.DLL",00000000,00000008) ret=004076a6 0024:trace:snoop:SNOOP_SetupDLL hmod=0x6e150000, name=accwiz.DLL 0024:Call PE DLL (proc=0x610dc900,module=0x61030000 L"oleaut32.dll",reason=PROCESS_ATTACH,res=(nil)) ... 0024:Ret PE DLL (proc=0x6e15e79c,module=0x6e150000 L"ACCWIZ.DLL",reason=PROCESS_ATTACH,res=(nil)) retval=1 0024:Ret KERNEL32.LoadLibraryExA() retval=6e150000 ret=004076a6 0024:Call KERNEL32.GetProcAddress(6e150000,008f96b8 "DllRegisterServerEx") ret=00418211 0024:Ret KERNEL32.GetProcAddress() retval=01250033 ret=00418211 0024:CALL accwiz.DllRegisterServerEx(<unknown, check return>) ret=00418244 0024:Call KERNEL32.LoadLibraryA(008f96d0 "32autole.dll") ret=6e15eb46 0024:trace:snoop:SNOOP_SetupDLL hmod=0x65340000, name=OLEAUT32.dll 0024:Call PE DLL (proc=0x6534b9ac,module=0x65340000 L"32autole.dll",reason=PROCESS_ATTACH,res=(nil)) ... 0024:Ret PE DLL (proc=0x6534b9ac,module=0x65340000 L"32autole.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0024:Ret KERNEL32.LoadLibraryA() retval=65340000 ret=6e15eb46 0024:Call KERNEL32.GetProcAddress(65340000,6e168378 "LoadTypeLib") ret=6e15eb65 0024:Ret KERNEL32.GetProcAddress() retval=01260aa0 ret=6e15eb65 0024:Call KERNEL32.GetProcAddress(65340000,6e168384 "RegisterTypeLib") ret=6e15eb75 0024:Ret KERNEL32.GetProcAddress() retval=01260ac2 ret=6e15eb75 --- snip ---
All typelib registration stuff goes through "32autole.dll" a.k.a. OLEAUT32.DLL Wine's builtin one is not used at that time (see previous proc addr resolutions).
Basically it boils down to LoadTypeLib() and RegisterTypeLib() problems of "stdole32.tlb". It first tries to locate the typelib path using registry:
--- snip --- ... 0024:Call advapi32.RegOpenKeyA(80000000,653b28ac "TypeLib",0033ebc8) ret=65351c33 0024:Ret advapi32.RegOpenKeyA() retval=00000000 ret=65351c33 0024:Call advapi32.RegOpenKeyW(000000f0,653b25dc L"{00020430-0000-0000-C000-000000000046}",0033ebcc) ret=65353360 0024:Ret advapi32.RegOpenKeyW() retval=00000000 ret=65353360 0024:Call advapi32.RegOpenKeyA(000000f4,0033ebb4 "1.0",0033ee18) ret=65351ca2 0024:Ret advapi32.RegOpenKeyA() retval=00000000 ret=65351ca2 0024:Call advapi32.RegOpenKeyA(000000f8,0033ebcc "0",0033eba8) ret=65351bb6 0024:Ret advapi32.RegOpenKeyA() retval=00000000 ret=65351bb6 0024:Call advapi32.RegOpenKeyW(000000fc,653b2880 L"win32",0033eba4) ret=65353360 0024:Ret advapi32.RegOpenKeyW() retval=00000000 ret=65353360 ... --- snip ---
It obviously fails to locate it because wine neither installs "stdole32.tlb" as placeholder dll (with embedded typelib resource) nor establishes a proper typelib path in registry.
--- snip --- ... 0024:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0033ee5c L"stdole32.tlb",ffffffff,0033e990,00000105,00000000,00000000) ret=653572f8 0024:Ret KERNEL32.WideCharToMultiByte() retval=0000000d ret=653572f8 0024:Call KERNEL32.OpenFile(0033e990 "stdole32.tlb",0033eab0,00000000) ret=65357314 0024:Ret KERNEL32.OpenFile() retval=ffffffff ret=65357314 --- snip ---
--- snip --- 0024:Ret PE DLL (proc=0x6534b9ac,module=0x65340000 L"32autole.dll",reason=PROCESS_DETACH,res=(nil)) retval=1 0024:Ret KERNEL32.FreeLibrary() retval=00000001 ret=6e15eca3 0024:RET accwiz.DllRegisterServerEx(008f96d0) retval=80029c4a ret=00418244 0024:Call KERNEL32.SetCurrentDirectoryA(0033f8ec "C:\windows") ret=00418276 0024:Ret KERNEL32.SetCurrentDirectoryA() retval=00000001 ret=00418276 0024:Call KERNEL32.FreeLibrary(6e150000) ret=00418291 0024:Call PE DLL (proc=0x6e15e79c,module=0x6e150000 L"ACCWIZ.DLL",reason=PROCESS_DETACH,res=(nil)) ... 0024:CALL MSSETUP.SetErrorParam(00000001,001a5d10) ret=0041829c 0024:RET MSSETUP.SetErrorParam() retval=001a5d10 ret=0041829c 0024:CALL MSSETUP.Validate(00000000,0010021f) ret=004182b1 0024:Call user32.LoadStringA(00400000,0000021f,0033f3c4,000003fa) ret=100020db 0024:Ret user32.LoadStringA() retval=0000003c ret=100020db 0024:Call user32.CharNextA(0033f3c4 "%A{}%1 was unable to register itself in the system registry.") ret=1000224b --- snip ---
(80029c4a -> HRESULT: TYPE_E_CANTLOADLIBRARY)
After adjusting wine install script for stdole32.tlb placeholder and fixing up the typelib path in registry
--- snip --- [HKEY_CLASSES_ROOT\Typelib{00020430-0000-0000-C000-000000000046}\1.0\0\win32] @="c:\windows\system32\stdole32.tlb" --- snip ---
it still fails, now with: 0x800288BD -> TYPE_E_BADMODULEKIND
After various testing with hand crafted typelibs, switching between Platform SDK MIDL and WIDL (just to cancel out WIDL as error path) it still wouldn't load.
It turned out that the shipped ole automation bootstrapper expects "stdole32.tlb" in v1 format (ICreateTypeLib/SGLT), not the v2 format wine currently provides (ICreateTypeLib2/MSFT). When manually generating a v1 typelib using ICreateTypeLib and embedding into PE it successfully loads and registers.
To resolve this bug, wine needs to generate/provide a v1 style placeholder "stdole32.tlb" in "c:\windows\system32\stdole32.tlb". It seems even Platform SDK ships "stdole32.tlb" as v1 typelib.
Note: the installer/office runtime still suffer from other bugs, ex:
"Setup was unable to start DDE communication with the Desktop" -> DDE with Windows program manager "An error has occurred at changing workgroup database" -> MS JET database engine provider/ole insufficiency
leading to later failure of access at run time. This bug is about "accwiz.dll failed to register itself"
Regards