Andrew Eikum : oleaut32: For 64-bit, fallback on the win32 key if win64 key is empty for typelibs.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:52 CST 2014


Module: wine
Branch: stable
Commit: 00b459a9e5a3c292f422b24a4804948b942d2bb5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=00b459a9e5a3c292f422b24a4804948b942d2bb5

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Wed Oct 16 08:21:13 2013 -0500

oleaut32: For 64-bit, fallback on the win32 key if win64 key is empty for typelibs.

(cherry picked from commit a8ebda980122423008e47d728a776bb408536f1c)

---

 dlls/oleaut32/tmarshal.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 2324fbb..3856f32 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -303,8 +303,16 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
     sprintf(typelibkey,"Typelib\\%s\\%s\\0\\win%u",tlguid,ver,(sizeof(void*) == 8) ? 64 : 32);
     tlfnlen = sizeof(tlfn);
     if (RegQueryValueA(HKEY_CLASSES_ROOT,typelibkey,tlfn,&tlfnlen)) {
-	ERR("Could not get typelib fn?\n");
-	return E_FAIL;
+#ifdef _WIN64
+        sprintf(typelibkey,"Typelib\\%s\\%s\\0\\win32",tlguid,ver);
+        tlfnlen = sizeof(tlfn);
+        if (RegQueryValueA(HKEY_CLASSES_ROOT,typelibkey,tlfn,&tlfnlen)) {
+#endif
+            ERR("Could not get typelib fn?\n");
+            return E_FAIL;
+#ifdef _WIN64
+        }
+#endif
     }
     MultiByteToWideChar(CP_ACP, 0, tlfn, -1, tlfnW, sizeof(tlfnW) / sizeof(tlfnW[0]));
     hres = LoadTypeLib(tlfnW,&tl);




More information about the wine-cvs mailing list