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
f4db5dfd
Commit
f4db5dfd
authored
Oct 13, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "Remove application" for applications that had some custom
settings.
parent
07c4dc46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
winecfg.c
programs/winecfg/winecfg.c
+39
-1
No files found.
programs/winecfg/winecfg.c
View file @
f4db5dfd
...
@@ -189,9 +189,47 @@ static HRESULT remove_value(HKEY root, const char *subkey, const char *name)
...
@@ -189,9 +189,47 @@ static HRESULT remove_value(HKEY root, const char *subkey, const char *name)
}
}
/* removes the requested subkey from the registry, assuming it exists */
/* removes the requested subkey from the registry, assuming it exists */
static
HRESULT
remove_path
(
HKEY
root
,
char
*
section
)
{
static
LONG
remove_path
(
HKEY
root
,
char
*
section
)
{
HKEY
branch_key
;
DWORD
max_sub_key_len
;
DWORD
subkeys
;
DWORD
curr_len
;
LONG
ret
=
ERROR_SUCCESS
;
long
int
i
;
char
*
buffer
;
WINE_TRACE
(
"section=%s
\n
"
,
section
);
WINE_TRACE
(
"section=%s
\n
"
,
section
);
if
((
ret
=
RegOpenKey
(
root
,
section
,
&
branch_key
))
!=
ERROR_SUCCESS
)
return
ret
;
/* get size information and resize the buffers if necessary */
if
((
ret
=
RegQueryInfoKey
(
branch_key
,
NULL
,
NULL
,
NULL
,
&
subkeys
,
&
max_sub_key_len
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
))
!=
ERROR_SUCCESS
)
return
ret
;
curr_len
=
strlen
(
section
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
max_sub_key_len
+
curr_len
+
1
);
strcpy
(
buffer
,
section
);
buffer
[
curr_len
]
=
'\\'
;
for
(
i
=
subkeys
-
1
;
i
>=
0
;
i
--
)
{
DWORD
buf_len
=
max_sub_key_len
-
curr_len
-
1
;
ret
=
RegEnumKeyEx
(
branch_key
,
i
,
buffer
+
curr_len
+
1
,
&
buf_len
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
&&
ret
!=
ERROR_MORE_DATA
&&
ret
!=
ERROR_NO_MORE_ITEMS
)
break
;
else
remove_path
(
root
,
buffer
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
RegCloseKey
(
branch_key
);
return
RegDeleteKey
(
root
,
section
);
return
RegDeleteKey
(
root
,
section
);
}
}
...
...
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