Commit 75c02048 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

oleaut32: Use the alternate interface key if not present on current view.

parent 8b0b6f90
......@@ -5493,11 +5493,7 @@ static void test_stub(void)
ok(hr == S_OK, "got: %x, side: %04x\n", hr, side);
hr = IPSFactoryBuffer_CreateStub(factory, &interfaceguid, &uk, &base_stub);
if ((is_win64 && side == KEY_WOW64_32KEY)
|| (is_wow64 && side == KEY_WOW64_64KEY))
todo_wine ok(hr == S_OK, "got: %x, side: %04x\n", hr, side);
else
ok(hr == S_OK, "got: %x, side: %04x\n", hr, side);
ok(hr == S_OK, "got: %x, side: %04x\n", hr, side);
IPSFactoryBuffer_Release(factory);
next:
......
......@@ -270,11 +270,13 @@ static HRESULT
_get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
HRESULT hres;
HKEY ikey;
REGSAM opposite = (sizeof(void*) == 8) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
BOOL is_wow64;
char tlguid[200],typelibkey[300],interfacekey[300],ver[100];
char tlfn[260];
OLECHAR tlfnW[260];
DWORD tlguidlen, verlen, type;
LONG tlfnlen;
LONG tlfnlen, err;
ITypeLib *tl;
sprintf( interfacekey, "Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
......@@ -283,9 +285,14 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]
);
if (RegOpenKeyA(HKEY_CLASSES_ROOT,interfacekey,&ikey)) {
ERR("No %s key found.\n",interfacekey);
return E_FAIL;
err = RegOpenKeyExA(HKEY_CLASSES_ROOT,interfacekey,0,KEY_READ,&ikey);
if (err && (opposite == KEY_WOW64_32KEY || (IsWow64Process(GetCurrentProcess(), &is_wow64)
&& is_wow64))) {
err = RegOpenKeyExA(HKEY_CLASSES_ROOT,interfacekey,0,KEY_READ|opposite,&ikey);
}
if (err) {
ERR("No %s key found.\n",interfacekey);
return E_FAIL;
}
tlguidlen = sizeof(tlguid);
if (RegQueryValueExA(ikey,NULL,NULL,&type,(LPBYTE)tlguid,&tlguidlen)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment