Commit f72f8e5c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

oleaut32: Register non-dual dispinterfaces using the correct proxy.

Fixes a bug where NetLinx Studio 4 would fail to compile files. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 767c94bc
......@@ -4963,6 +4963,7 @@ static void test_register_typelib(BOOL system_registration)
HKEY hkey;
REGSAM opposite = (sizeof(void*) == 8 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY);
BOOL is_wow64 = FALSE;
LONG size;
struct
{
TYPEKIND kind;
......@@ -5071,7 +5072,26 @@ static void test_register_typelib(BOOL system_registration)
ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey);
ok(ret == expect_ret, "%d: got %d\n", i, ret);
if(ret == ERROR_SUCCESS) RegCloseKey(hkey);
if (ret == ERROR_SUCCESS)
{
size = sizeof(uuid);
ret = RegQueryValueA(hkey, "ProxyStubClsid32", uuid, &size);
ok(!ret, "Failed to get proxy GUID, error %u.\n", ret);
if (attrs[i].kind == TKIND_INTERFACE || (attrs[i].flags & TYPEFLAG_FDUAL))
{
ok(!strcasecmp(uuid, "{00020424-0000-0000-c000-000000000046}"),
"Got unexpected proxy CLSID %s.\n", uuid);
}
else
{
ok(!strcasecmp(uuid, "{00020420-0000-0000-c000-000000000046}"),
"Got unexpected proxy CLSID %s.\n", uuid);
}
RegCloseKey(hkey);
}
/* 32-bit typelibs should be registered into both registry bit modes */
if (is_win64 || is_wow64)
......
......@@ -578,14 +578,24 @@ static void TLB_register_interface(TLIBATTR *libattr, LPOLESTR name, TYPEATTR *t
WCHAR keyName[60];
HKEY key, subKey;
static const WCHAR PSOA[] = {'{','0','0','0','2','0','4','2','4','-',
'0','0','0','0','-','0','0','0','0','-','C','0','0','0','-',
'0','0','0','0','0','0','0','0','0','0','4','6','}',0};
static const WCHAR typelib_proxy_clsid[] = {'{','0','0','0','2','0','4','2','4','-',
'0','0','0','0','-','0','0','0','0','-','C','0','0','0','-',
'0','0','0','0','0','0','0','0','0','0','4','6','}',0};
static const WCHAR dispatch_proxy_clsid[] = {'{','0','0','0','2','0','4','2','0','-',
'0','0','0','0','-','0','0','0','0','-','C','0','0','0','-',
'0','0','0','0','0','0','0','0','0','0','4','6','}',0};
get_interface_key( &tattr->guid, keyName );
if (RegCreateKeyExW(HKEY_CLASSES_ROOT, keyName, 0, NULL, 0,
KEY_WRITE | flag, NULL, &key, NULL) == ERROR_SUCCESS)
{
const WCHAR *proxy_clsid;
if (tattr->typekind == TKIND_INTERFACE || (tattr->wTypeFlags & TYPEFLAG_FDUAL))
proxy_clsid = typelib_proxy_clsid;
else
proxy_clsid = dispatch_proxy_clsid;
if (name)
RegSetValueExW(key, NULL, 0, REG_SZ,
(BYTE *)name, (strlenW(name)+1) * sizeof(OLECHAR));
......@@ -593,14 +603,14 @@ static void TLB_register_interface(TLIBATTR *libattr, LPOLESTR name, TYPEATTR *t
if (RegCreateKeyExW(key, ProxyStubClsidW, 0, NULL, 0,
KEY_WRITE | flag, NULL, &subKey, NULL) == ERROR_SUCCESS) {
RegSetValueExW(subKey, NULL, 0, REG_SZ,
(const BYTE *)PSOA, sizeof PSOA);
(const BYTE *)proxy_clsid, sizeof(typelib_proxy_clsid));
RegCloseKey(subKey);
}
if (RegCreateKeyExW(key, ProxyStubClsid32W, 0, NULL, 0,
KEY_WRITE | flag, NULL, &subKey, NULL) == ERROR_SUCCESS) {
RegSetValueExW(subKey, NULL, 0, REG_SZ,
(const BYTE *)PSOA, sizeof PSOA);
(const BYTE *)proxy_clsid, sizeof(typelib_proxy_clsid));
RegCloseKey(subKey);
}
......
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