http://bugs.winehq.org/show_bug.cgi?id=17991
Summary: QueryPathOfRegTypeLib fails to locate typelib when (major.minor) = (0xffff.0xffff) Product: Wine Version: 1.1.18 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
oleauto32.QueryPathOfRegTypeLib() doesn't work correctly when (major.minor) = (0xffff.0xffff). These parameters are passed by .NET Framework/CLR when regasm.exe utility is used to export and register typelibs from .NET assemblies. E.g. something like this:
--- snip --- $ wine regasm.exe foo.dll /codebase /tlb --- snip ---
WINEDEBUG=+tid,+seh,+ole,+reg
--- snip --- ... 0021:trace:typelib:QueryPathOfRegTypeLib ({00020430-0000-0000-c000-000000000046}, ffff.ffff, 0x0, 0x32d634) 0021:trace:reg:NtOpenKey (0x21c,L"Typelib\{00020430-0000-0000-C000-000000000046}",20019,0x32cfcc) 0021:trace:reg:NtOpenKey <- 0x22c 0021:trace:reg:RegEnumKeyExA (0x22c,0,0x32cfd4,0x32cfd0(16),(nil),(nil),(nil),(nil)) 0021:trace:ole:find_typelib_key found L"Typelib\{00020430-0000-0000-C000-000000000046}": 1.0 0021:trace:reg:RegEnumKeyExA (0x22c,1,0x32cfd4,0x32cfd0(16),(nil),(nil),(nil),(nil)) 0021:trace:ole:find_typelib_key found L"Typelib\{00020430-0000-0000-C000-000000000046}": 2.0 0021:trace:reg:RegEnumKeyExA (0x22c,2,0x32cfd4,0x32cfd0(16),(nil),(nil),(nil),(nil)) 0021:trace:ole:GetErrorInfo (0, 0x32cb70, (nil)) 0021:trace:ole:CreateErrorInfo (0x32aab8) 0021:trace:ole:IErrorInfoImpl_QueryInterface (0x1d4110)->( IID: {22f03340-547d-101b-8e65-08002b2bd119},0x32aab8) 0021:trace:ole:ICreateErrorInfoImpl_AddRef (0x1d4110) 0021:trace:ole:IErrorInfoImpl_AddRef (0x1d4110)->(count=1) 0021:trace:ole:IErrorInfoImpl_QueryInterface -- Interface: (0x32aab8)->(0x1d4114) 0021:trace:ole:IErrorInfoImpl_Release (0x1d4110)->(count=2) 0021:trace:ole:ICreateErrorInfoImpl_SetDescription (0x1d4110): L"Type library exporter encountered an error while processing 'SlingSDK'. Error: Common Language Runtime Internal error: 0x8002801d" 0021:trace:ole:ICreateErrorInfoImpl_SetHelpFile (0x1d4110,L"complib.hlp") 0021:trace:ole:ICreateErrorInfoImpl_SetHelpContext (0x1d4110,4451) 0021:trace:ole:ICreateErrorInfoImpl_QueryInterface (0x1d4110) 0021:trace:ole:IErrorInfoImpl_QueryInterface (0x1d4110)->( IID: {1cf2b120-547d-101b-8e65-08002b2bd119},0x32aab4) 0021:trace:ole:IErrorInfoImpl_AddRef (0x1d4110)->(count=1) 0021:trace:ole:IErrorInfoImpl_QueryInterface -- Interface: (0x32aab4)->(0x1d4110) 0021:trace:ole:SetErrorInfo (0, 0x1d4110) 0021:trace:ole:IErrorInfoImpl_AddRef (0x1d4110)->(count=2) 0021:trace:ole:ICreateErrorInfoImpl_Release (0x1d4110) 0021:trace:ole:IErrorInfoImpl_Release (0x1d4110)->(count=3) 0021:trace:ole:IErrorInfoImpl_Release (0x1d4110)->(count=2) 0021:trace:ole:GetErrorInfo (0, 0x32cb3c, 0x1d4110) 0021:trace:ole:IErrorInfoImpl_GetSource (0x1d4110)->(pBstrSource=0x1d4298) 0021:trace:ole:IErrorInfoImpl_GetDescription (0x1d4110)->(pBstrDescription=0x1d4294) 0021:trace:ole:IErrorInfoImpl_GetHelpFile (0x1d4110)->(pBstrHelpFile=0x1d429c) 0021:trace:ole:IErrorInfoImpl_GetHelpContext (0x1d4110)->(pdwHelpContext=0x1d42a0) 0021:trace:ole:IErrorInfoImpl_GetGUID (0x1d4110)->(count=1) 0021:trace:ole:IErrorInfoImpl_Release (0x1d4110)->(count=1) 0021:trace:ole:IErrorInfoImpl_Release -- destroying IErrorInfo(0x1d4110) 0021:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b8437e8 ip=0x7b84386b tid=0021 0021:trace:seh:raise_exception info[0]=19930520 0021:trace:seh:raise_exception info[1]=0032cb1c 0021:trace:seh:raise_exception info[2]=7a35d570 0021:trace:seh:raise_exception eax=7b82ca2d ebx=7b8c2bf8 ecx=00000000 edx=00004000 esi=00004000 edi=00000000 0021:trace:seh:raise_exception ebp=0032ca98 esp=0032ca34 cs=0023 ds=002b es=002b fs=0063 gs=006b --- snip ---
MSDN doesn't mention such condition so this obviously needs some test case to find out what logic is used to select the best match (first? last? lowest? highest?).
dll/oleaut32/typelib.c:find_typelib_key() needs to be fixed accordingly. "wMaj" needs to be made an "out" parameter too to actually return best matching maj.min pair
With this part fixed it goes further - only to stumble into next bug ;-)
Regards
http://bugs.winehq.org/show_bug.cgi?id=17991
--- Comment #1 from Austin English austinenglish@gmail.com 2009-04-10 02:12:39 --- Is there a download showing this?
http://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://downloads.slingmedia. | |com/go/slingbox-desktop-us Keywords| |dotnet, download
http://bugs.winehq.org/show_bug.cgi?id=17991
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-13 01:15:15 --- Does the following patch help? http://www.winehq.org/pipermail/wine-patches/2009-April/071793.html
http://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #3 from Anastasius Focht focht@gmx.net 2009-04-13 06:03:24 --- Hello,
yes looks fine.
WINEDEBUG=+tid,+seh,+relay,+ole wine ../../../windows/Microsoft.NET/Framework/v2.0.50727/regasm.exe SlingSDK.dll /code /tlb > log.txt 2>&1
--- snip --- ... 007b:Call oleaut32.QueryPathOfRegTypeLib(79fa04e0,0000ffff,0000ffff,00000000,0032cc40) ret=7a03a863 007b:Call ole32.StringFromGUID2(79fa04e0,0032c568,00000028) ret=60e1989d 007b:Ret ole32.StringFromGUID2() retval=00000027 ret=60e1989d 007b:Call advapi32.RegOpenKeyExW(80000000,0032c558 L"Typelib\{00020430-0000-0000-C000-000000000046}",00000000,00020019,0032c540) ret=60e198d0 007b:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=60e198d0 007b:Call advapi32.RegEnumKeyExA(00000220,00000000,0032c548,0032c544,00000000,00000000,00000000,00000000) ret=60e19a99 007b:Ret advapi32.RegEnumKeyExA() retval=00000000 ret=60e19a99 007b:trace:ole:find_typelib_key found L"Typelib\{00020430-0000-0000-C000-000000000046}": 1.0 007b:Call advapi32.RegEnumKeyExA(00000220,00000001,0032c548,0032c544,00000000,00000000,00000000,00000000) ret=60e19a99 007b:Ret advapi32.RegEnumKeyExA() retval=00000000 ret=60e19a99 007b:trace:ole:find_typelib_key found L"Typelib\{00020430-0000-0000-C000-000000000046}": 2.0 007b:Call advapi32.RegEnumKeyExA(00000220,00000002,0032c548,0032c544,00000000,00000000,00000000,00000000) ret=60e19a99 007b:Ret advapi32.RegEnumKeyExA() retval=00000103 ret=60e19a99 007b:Call advapi32.RegCloseKey(00000220) ret=60e19ab2 007b:Ret advapi32.RegCloseKey() retval=00000000 ret=60e19ab2 007b:trace:ole:find_typelib_key found best_maj 2, best_min 0 007b:Call ole32.StringFromGUID2(79fa04e0,0032c864,00000028) ret=60e19c26 007b:Ret ole32.StringFromGUID2() retval=00000027 ret=60e19c26 007b:Call advapi32.RegOpenKeyExW(80000000,0032c854 L"Typelib\{00020430-0000-0000-C000-000000000046}\2.0",00000000,00020019,0032c8cc) ret=60e19eeb 007b:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=60e19eeb 007b:Call advapi32.RegQueryValueW(00000220,0032c854 L"0\win32",0032c64c,0032c648) ret=60e1a021 007b:Ret advapi32.RegQueryValueW() retval=00000000 ret=60e1a021 007b:Call KERNEL32.lstrlenW(0032c64c L"C:\windows\system32\stdole2.tlb") ret=60dfbda4 007b:Ret KERNEL32.lstrlenW() retval=0000001f ret=60dfbda4 ... 007b:Ret oleaut32.QueryPathOfRegTypeLib() retval=00000000 ret=7a03a863 ... 007b:Call oleaut32.LoadTypeLibEx(001e804c L"C:\windows\system32\stdole2.tlb",00000022,0032cc60) ret=7a03a892 007b:trace:ole:LoadTypeLibEx (L"C:\windows\system32\stdole2.tlb",34,0x32cc60) ... 007b:Call KERNEL32.LoadLibraryExW(0032c6f6 L"C:\windows\system32\stdole2.tlb",00000000,0000000b) ret=60e200a6 007b:Ret KERNEL32.LoadLibraryExW() retval=03b70001 ret=60e200a6 ... ---snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18025
http://bugs.winehq.org/show_bug.cgi?id=17991
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-14 21:45:48 --- The patch has been committed.
http://bugs.winehq.org/show_bug.cgi?id=17991
--- Comment #5 from Anastasius Focht focht@gmx.net 2009-04-15 14:45:01 --- Hello,
thanks, fixed by commit 69ec6b4c6d74926a2182c5bf9f1ac9e4562f4f13
Regards
http://bugs.winehq.org/show_bug.cgi?id=17991
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2009-04-24 12:22:21 --- Closing bugs fixed in 1.1.20.
http://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |69ec6b4c6d74926a2182c5bf9f1 | |ac9e4562f4f13
--- Comment #7 from Anastasius Focht focht@gmx.net 2011-10-11 15:34:28 CDT --- Hello,
filling/correcting fields ...
Regards
http://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|Other |x86 OS|other |Linux
https://bugs.winehq.org/show_bug.cgi?id=17991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://downloads.slingmedia |https://web.archive.org/web |.com/go/slingbox-desktop-us |/20210319115734/http://down | |load.slingmedia.com/player/ | |pc/SP2/SlingPlayer-2.0.3508 | |-Setup-US.exe Keywords| |Installer