Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
86b7fc38
Commit
86b7fc38
authored
Jun 01, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Delete opposite side keys on UnRegisterTypeLib.
parent
3f65a869
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
typelib.c
dlls/oleaut32/tests/typelib.c
+0
-3
typelib.c
dlls/oleaut32/typelib.c
+26
-13
No files found.
dlls/oleaut32/tests/typelib.c
View file @
86b7fc38
...
...
@@ -4347,10 +4347,7 @@ static void test_register_typelib(BOOL system_registration)
if
(
is_win64
||
is_wow64
)
{
ret
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
key_name
,
0
,
KEY_READ
|
opposite
,
&
hkey
);
todo_wine
{
ok
(
ret
==
ERROR_FILE_NOT_FOUND
,
"Interface registry remains in %s (%d)
\n
"
,
key_name
,
i
);
if
(
ret
==
ERROR_SUCCESS
)
RegCloseKey
(
hkey
);
}
}
}
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
attr
);
...
...
dlls/oleaut32/typelib.c
View file @
86b7fc38
...
...
@@ -838,6 +838,24 @@ HRESULT WINAPI RegisterTypeLib(
return
res
;
}
static
void
TLB_unregister_interface
(
GUID
*
guid
,
REGSAM
flag
)
{
WCHAR
subKeyName
[
50
];
HKEY
subKey
;
/* the path to the type */
get_interface_key
(
guid
,
subKeyName
);
/* Delete its bits */
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
subKeyName
,
0
,
KEY_WRITE
|
flag
,
&
subKey
)
!=
ERROR_SUCCESS
)
return
;
RegDeleteKeyW
(
subKey
,
ProxyStubClsidW
);
RegDeleteKeyW
(
subKey
,
ProxyStubClsid32W
);
RegDeleteKeyW
(
subKey
,
TypeLibW
);
RegCloseKey
(
subKey
);
RegDeleteKeyExW
(
HKEY_CLASSES_ROOT
,
subKeyName
,
flag
,
0
);
}
/******************************************************************************
* UnRegisterTypeLib [OLEAUT32.186]
...
...
@@ -863,7 +881,6 @@ HRESULT WINAPI UnRegisterTypeLib(
DWORD
i
=
0
;
BOOL
deleteOtherStuff
;
HKEY
key
=
NULL
;
HKEY
subKey
=
NULL
;
TYPEATTR
*
typeAttr
=
NULL
;
TYPEKIND
kind
;
ITypeInfo
*
typeInfo
=
NULL
;
...
...
@@ -922,19 +939,16 @@ HRESULT WINAPI UnRegisterTypeLib(
if
((
kind
==
TKIND_INTERFACE
&&
(
typeAttr
->
wTypeFlags
&
TYPEFLAG_FOLEAUTOMATION
))
||
kind
==
TKIND_DISPATCH
)
{
/* the path to the type */
get_interface_key
(
&
typeAttr
->
guid
,
subKeyName
);
BOOL
is_wow64
;
REGSAM
opposite
=
(
sizeof
(
void
*
)
==
8
?
KEY_WOW64_32KEY
:
KEY_WOW64_64KEY
);
/* Delete its bits */
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
subKeyName
,
0
,
KEY_WRITE
,
&
subKey
)
!=
ERROR_SUCCESS
)
goto
enddeleteloop
;
TLB_unregister_interface
(
&
typeAttr
->
guid
,
0
);
RegDeleteKeyW
(
subKey
,
ProxyStubClsidW
);
RegDeleteKeyW
(
subKey
,
ProxyStubClsid32W
);
RegDeleteKeyW
(
subKey
,
TypeLibW
);
RegCloseKey
(
subKey
);
subKey
=
NULL
;
RegDeleteKeyW
(
HKEY_CLASSES_ROOT
,
subKeyName
);
/* unregister TLBs into the opposite registry view, too */
if
(
opposite
==
KEY_WOW64_32KEY
||
(
IsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
)
&&
is_wow64
))
{
TLB_unregister_interface
(
&
typeAttr
->
guid
,
opposite
);
}
}
enddeleteloop
:
...
...
@@ -980,7 +994,6 @@ enddeleteloop:
end
:
SysFreeString
(
tlibPath
);
if
(
typeLib
)
ITypeLib_Release
(
typeLib
);
if
(
subKey
)
RegCloseKey
(
subKey
);
if
(
key
)
RegCloseKey
(
key
);
return
result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment