Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6be7eba9
Commit
6be7eba9
authored
Sep 25, 2007
by
Stefan Leichter
Committed by
Alexandre Julliard
Sep 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comcat: Remove 'recursive registry key delete' function.
parent
4677e50a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
59 deletions
+4
-59
regsvr.c
dlls/comcat/regsvr.c
+4
-59
No files found.
dlls/comcat/regsvr.c
View file @
6be7eba9
...
...
@@ -101,8 +101,6 @@ static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
WCHAR
const
*
value
);
static
LONG
register_key_defvalueA
(
HKEY
base
,
WCHAR
const
*
name
,
char
const
*
value
);
static
LONG
recursive_delete_key
(
HKEY
key
);
/***********************************************************************
* register_interfaces
...
...
@@ -189,22 +187,12 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list)
for
(;
res
==
ERROR_SUCCESS
&&
list
->
iid
;
++
list
)
{
WCHAR
buf
[
39
];
HKEY
iid_key
;
StringFromGUID2
(
list
->
iid
,
buf
,
39
);
res
=
RegOpenKeyExW
(
interface_key
,
buf
,
0
,
KEY_READ
|
KEY_WRITE
,
&
iid_key
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
{
res
=
ERROR_SUCCESS
;
continue
;
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_interface_key
;
res
=
recursive_delete_key
(
iid_key
);
RegCloseKey
(
iid_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_interface_key
;
res
=
RegDeleteTreeW
(
interface_key
,
buf
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
}
error_close_interface_key:
RegCloseKey
(
interface_key
);
error_return:
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
...
...
@@ -287,23 +275,12 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
for
(;
res
==
ERROR_SUCCESS
&&
list
->
clsid
;
++
list
)
{
WCHAR
buf
[
39
];
HKEY
clsid_key
;
StringFromGUID2
(
list
->
clsid
,
buf
,
39
);
res
=
RegOpenKeyExW
(
coclass_key
,
buf
,
0
,
KEY_READ
|
KEY_WRITE
,
&
clsid_key
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
{
res
=
ERROR_SUCCESS
;
continue
;
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_coclass_key
;
res
=
recursive_delete_key
(
clsid_key
);
RegCloseKey
(
clsid_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_coclass_key
;
res
=
RegDeleteTreeW
(
coclass_key
,
buf
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
}
error_close_coclass_key:
RegCloseKey
(
coclass_key
);
error_return:
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
}
...
...
@@ -360,38 +337,6 @@ static LONG register_key_defvalueA(
}
/***********************************************************************
* recursive_delete_key
*/
static
LONG
recursive_delete_key
(
HKEY
key
)
{
LONG
res
;
WCHAR
subkey_name
[
MAX_PATH
];
DWORD
cName
;
HKEY
subkey
;
for
(;;)
{
cName
=
sizeof
(
subkey_name
)
/
sizeof
(
WCHAR
);
res
=
RegEnumKeyExW
(
key
,
0
,
subkey_name
,
&
cName
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
&&
res
!=
ERROR_MORE_DATA
)
{
res
=
ERROR_SUCCESS
;
/* presumably we're done enumerating */
break
;
}
res
=
RegOpenKeyExW
(
key
,
subkey_name
,
0
,
KEY_READ
|
KEY_WRITE
,
&
subkey
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
continue
;
if
(
res
!=
ERROR_SUCCESS
)
break
;
res
=
recursive_delete_key
(
subkey
);
RegCloseKey
(
subkey
);
if
(
res
!=
ERROR_SUCCESS
)
break
;
}
if
(
res
==
ERROR_SUCCESS
)
res
=
RegDeleteKeyW
(
key
,
0
);
return
res
;
}
/***********************************************************************
* coclass list
*/
static
struct
regsvr_coclass
const
coclass_list
[]
=
{
...
...
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