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
c13c9e38
Commit
c13c9e38
authored
Aug 22, 2007
by
Stefan Leichter
Committed by
Alexandre Julliard
Aug 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Remove 'recursive registry key delete' function.
parent
8506125c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
74 deletions
+10
-74
regsvr.c
dlls/quartz/regsvr.c
+10
-74
No files found.
dlls/quartz/regsvr.c
View file @
c13c9e38
...
...
@@ -172,9 +172,6 @@ static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
static
LONG
register_progid
(
WCHAR
const
*
clsid
,
char
const
*
progid
,
char
const
*
curver_progid
,
char
const
*
name
,
char
const
*
extra
);
static
LONG
recursive_delete_key
(
HKEY
key
);
static
LONG
recursive_delete_keyA
(
HKEY
base
,
char
const
*
name
);
static
LONG
recursive_delete_keyW
(
HKEY
base
,
WCHAR
const
*
name
);
/***********************************************************************
* register_interfaces
...
...
@@ -263,7 +260,8 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list)
WCHAR
buf
[
39
];
StringFromGUID2
(
list
->
iid
,
buf
,
39
);
res
=
recursive_delete_keyW
(
interface_key
,
buf
);
res
=
RegDeleteTreeW
(
interface_key
,
buf
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
}
RegCloseKey
(
interface_key
);
...
...
@@ -370,16 +368,19 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
WCHAR
buf
[
39
];
StringFromGUID2
(
list
->
clsid
,
buf
,
39
);
res
=
recursive_delete_keyW
(
coclass_key
,
buf
);
res
=
RegDeleteTreeW
(
coclass_key
,
buf
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_coclass_key
;
if
(
list
->
progid
)
{
res
=
recursive_delete_keyA
(
HKEY_CLASSES_ROOT
,
list
->
progid
);
res
=
RegDeleteTreeA
(
HKEY_CLASSES_ROOT
,
list
->
progid
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_coclass_key
;
}
if
(
list
->
viprogid
)
{
res
=
recursive_delete_keyA
(
HKEY_CLASSES_ROOT
,
list
->
viprogid
);
res
=
RegDeleteTreeA
(
HKEY_CLASSES_ROOT
,
list
->
viprogid
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_coclass_key
;
}
}
...
...
@@ -521,7 +522,7 @@ static HRESULT unregister_mediatypes_parsing(struct regsvr_mediatype_parsing con
if
(
res
!=
ERROR_SUCCESS
)
break
;
StringFromGUID2
(
list
->
subtype
,
buf
,
39
);
res
=
recursive_delete_key
W
(
majortype_key
,
buf
);
res
=
RegDeleteTree
W
(
majortype_key
,
buf
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
/* Removed majortype key if there is no more subtype key */
...
...
@@ -556,7 +557,7 @@ static HRESULT unregister_mediatypes_extension(struct regsvr_mediatype_extension
res
=
ERROR_SUCCESS
;
else
if
(
res
==
ERROR_SUCCESS
)
for
(;
res
==
ERROR_SUCCESS
&&
list
->
majortype
;
++
list
)
{
res
=
recursive_delete_key
A
(
extensions_root_key
,
list
->
extension
);
res
=
RegDeleteTree
A
(
extensions_root_key
,
list
->
extension
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
}
...
...
@@ -775,71 +776,6 @@ error_close_progid_key:
return
res
;
}
/***********************************************************************
* 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
;
}
/***********************************************************************
* recursive_delete_keyA
*/
static
LONG
recursive_delete_keyA
(
HKEY
base
,
char
const
*
name
)
{
LONG
res
;
HKEY
key
;
res
=
RegOpenKeyExA
(
base
,
name
,
0
,
KEY_READ
|
KEY_WRITE
,
&
key
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
return
ERROR_SUCCESS
;
if
(
res
!=
ERROR_SUCCESS
)
return
res
;
res
=
recursive_delete_key
(
key
);
RegCloseKey
(
key
);
return
res
;
}
/***********************************************************************
* recursive_delete_keyW
*/
static
LONG
recursive_delete_keyW
(
HKEY
base
,
WCHAR
const
*
name
)
{
LONG
res
;
HKEY
key
;
res
=
RegOpenKeyExW
(
base
,
name
,
0
,
KEY_READ
|
KEY_WRITE
,
&
key
);
if
(
res
==
ERROR_FILE_NOT_FOUND
)
return
ERROR_SUCCESS
;
if
(
res
!=
ERROR_SUCCESS
)
return
res
;
res
=
recursive_delete_key
(
key
);
RegCloseKey
(
key
);
return
res
;
}
static
GUID
const
CLSID_PSFactoryBuffer
=
{
0x92a3a302
,
0xda7c
,
0x4a1f
,
{
0xba
,
0x7e
,
0x18
,
0x02
,
0xbb
,
0x5d
,
0x2d
,
0x02
}
};
...
...
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