Commit fbaaedd9 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

oleaut32: Only unregister those types that were registered.

parent adeba6ee
...@@ -835,19 +835,23 @@ HRESULT WINAPI UnRegisterTypeLib( ...@@ -835,19 +835,23 @@ HRESULT WINAPI UnRegisterTypeLib(
goto enddeleteloop; goto enddeleteloop;
} }
if ((kind == TKIND_INTERFACE && (typeAttr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) ||
kind == TKIND_DISPATCH)
{
/* the path to the type */ /* the path to the type */
get_interface_key( &typeAttr->guid, subKeyName ); get_interface_key( &typeAttr->guid, subKeyName );
/* Delete its bits */ /* Delete its bits */
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, subKeyName, 0, KEY_WRITE, &subKey) != ERROR_SUCCESS) { if (RegOpenKeyExW(HKEY_CLASSES_ROOT, subKeyName, 0, KEY_WRITE, &subKey) != ERROR_SUCCESS)
goto enddeleteloop; goto enddeleteloop;
}
RegDeleteKeyW(subKey, ProxyStubClsidW); RegDeleteKeyW(subKey, ProxyStubClsidW);
RegDeleteKeyW(subKey, ProxyStubClsid32W); RegDeleteKeyW(subKey, ProxyStubClsid32W);
RegDeleteKeyW(subKey, TypeLibW); RegDeleteKeyW(subKey, TypeLibW);
RegCloseKey(subKey); RegCloseKey(subKey);
subKey = NULL; subKey = NULL;
RegDeleteKeyW(HKEY_CLASSES_ROOT, subKeyName); RegDeleteKeyW(HKEY_CLASSES_ROOT, subKeyName);
}
enddeleteloop: enddeleteloop:
if (typeAttr) ITypeInfo_ReleaseTypeAttr(typeInfo, typeAttr); if (typeAttr) ITypeInfo_ReleaseTypeAttr(typeInfo, typeAttr);
......
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