Hi,
I was browsing some code and found that we have several places where we made our own implementation of a recursive delete of registry keys/value.
Apparently there is an official one in Vista:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/bas...
I don't know if somebody has this already lying around somewhere. If not, I'll have a go (not soon though).
Would be a nice code cleanup, or are there any pitfalls?
Cheers,
Paul.
Paul Vriens wrote:
Hi,
I was browsing some code and found that we have several places where we made our own implementation of a recursive delete of registry keys/value.
See winecfg.
Vitaliy.
On Thu, 2006-09-28 at 07:01 -0600, Vitaliy Margolen wrote:
Paul Vriens wrote:
Hi,
I was browsing some code and found that we have several places where we made our own implementation of a recursive delete of registry keys/value.
See winecfg.
Vitaliy.
Do you mean winecfg has it's implementation, or winecfg has the solution?
I had another look, apparently shlwapi has SHDeleteKey[A|W]. It does the same thing.
I'll have a few hours tomorrow and will have a look. The cleanest solution for now seems to create RegDeleteTree[A|W] in advapi32 and use that wherever possible (unless we find that it forwards to shlwapi). Most DLL's already import advapi32.
Cheers,
Paul.
On 28.09.2006 15:26, Paul Vriens wrote:
I'll have a few hours tomorrow and will have a look. The cleanest solution for now seems to create RegDeleteTree[A|W] in advapi32 and use that wherever possible (unless we find that it forwards to shlwapi). Most DLL's already import advapi32.
Hmm... isn't advapi32 "lower level" than shlwapi? I'd expect that if forwarding takes place then it'd be shlwapi->advapi32.
-f.r.
Is Anyone currently working on this?
If Not - I would like to start working on this part myself, it seems like it is fairly simple - but tedious work :-)
Shouldn't be too much of a hassle and should help a little
--Brad DeMorrow
On 9/28/06, Frank Richter frank.richter@gmail.com wrote:
On 28.09.2006 15:26, Paul Vriens wrote:
I'll have a few hours tomorrow and will have a look. The cleanest solution for now seems to create RegDeleteTree[A|W] in advapi32 and use that wherever possible (unless we find that it forwards to shlwapi). Most DLL's already import advapi32.
Hmm... isn't advapi32 "lower level" than shlwapi? I'd expect that if forwarding takes place then it'd be shlwapi->advapi32.
-f.r.
Brad DeMorrow wrote:
Is Anyone currently working on this?
If Not - I would like to start working on this part myself, it seems like it is fairly simple - but tedious work :-)
Shouldn't be too much of a hassle and should help a little
--Brad DeMorrow
On 9/28/06, Frank Richter frank.richter@gmail.com wrote:
On 28.09.2006 15:26, Paul Vriens wrote:
I'll have a few hours tomorrow and will have a look. The cleanest solution for now seems to create RegDeleteTree[A|W] in advapi32 and use that wherever possible (unless we find that it forwards to shlwapi). Most DLL's already import advapi32.
Hmm... isn't advapi32 "lower level" than shlwapi? I'd expect that if forwarding takes place then it'd be shlwapi->advapi32.
-f.r.
Some Google searching provides that there may or may not be an implementation.
http://www.reactos.org/pipermail/ros-svn/2005-August/005303.html ([ros-svn] [weiden] 17572: implemented RegDeleteTree() (untested!)) mentions this, and nothing more: --- CUT --- implemented RegDeleteTree() (untested!)
Updated files: trunk/reactos/lib/advapi32/reg/reg.c --- CUT --- The code moved around in their tree a bit, it's actually trunk/reactos/dll/win32/advapi32/reg/reg.c, and you can view the code here: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg....
On 10/10/06, Segin segin2005@gmail.com wrote:
Some Google searching provides that there may or may not be an implementation.
http://www.reactos.org/pipermail/ros-svn/2005-August/005303.html ([ros-svn] [weiden] 17572: implemented RegDeleteTree() (untested!)) mentions this, and nothing more: --- CUT --- implemented RegDeleteTree() (untested!)
Updated files: trunk/reactos/lib/advapi32/reg/reg.c --- CUT --- The code moved around in their tree a bit, it's actually trunk/reactos/dll/win32/advapi32/reg/reg.c, and you can view the code here: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg....
We don't accept code from the ReactOS project.
James Hawkins wrote:
On 10/10/06, Segin segin2005@gmail.com wrote:
Some Google searching provides that there may or may not be an implementation.
http://www.reactos.org/pipermail/ros-svn/2005-August/005303.html ([ros-svn] [weiden] 17572: implemented RegDeleteTree() (untested!)) mentions this, and nothing more: --- CUT --- implemented RegDeleteTree() (untested!)
Updated files: trunk/reactos/lib/advapi32/reg/reg.c --- CUT --- The code moved around in their tree a bit, it's actually trunk/reactos/dll/win32/advapi32/reg/reg.c, and you can view the code here: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg....
We don't accept code from the ReactOS project.
Thought it was a good idea at the time, but I can understand why you wouldn't accept it. (I can assume that this has to do with ensuring that the code is honest, due to the previous ReactOS "scandal")
Segin wrote:
James Hawkins wrote:
On 10/10/06, Segin segin2005@gmail.com wrote:
Some Google searching provides that there may or may not be an implementation.
http://www.reactos.org/pipermail/ros-svn/2005-August/005303.html ([ros-svn] [weiden] 17572: implemented RegDeleteTree() (untested!)) mentions this, and nothing more: --- CUT --- implemented RegDeleteTree() (untested!)
Updated files: trunk/reactos/lib/advapi32/reg/reg.c --- CUT --- The code moved around in their tree a bit, it's actually trunk/reactos/dll/win32/advapi32/reg/reg.c, and you can view the code here: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg....
We don't accept code from the ReactOS project.
Thought it was a good idea at the time, but I can understand why you wouldn't accept it. (I can assume that this has to do with ensuring that the code is honest, due to the previous ReactOS "scandal")
There are 2 (TWO) implementations of this functionality in Wine: 1. http://source.winehq.org/source/programs/winecfg/winecfg.c#L210 2. http://source.winehq.org/source/dlls/advapi32/registry.c#L938
If you guys need one more - have at it ;-)
Vitaliy
On Tue, 2006-10-10 at 16:32 -0500, Brad DeMorrow wrote:
Is Anyone currently working on this?
If Not - I would like to start working on this part myself, it seems like it is fairly simple - but tedious work :-)
Shouldn't be too much of a hassle and should help a little
--Brad DeMorrow
On 9/28/06, Frank Richter frank.richter@gmail.com wrote: On 28.09.2006 15:26, Paul Vriens wrote: > I'll have a few hours tomorrow and will have a look. The cleanest > solution for now seems to create RegDeleteTree[A|W] in advapi32 and use > that wherever possible (unless we find that it forwards to shlwapi). > Most DLL's already import advapi32.
Hmm... isn't advapi32 "lower level" than shlwapi? I'd expect that if forwarding takes place then it'd be shlwapi->advapi32. -f.r.
I've created a wikipage for it:
http://wiki.winehq.org/RecursiveRegistryKeyDelete
There you can find pointers to several implementations already.
When I raised the question I thought I could find some spare time. (I didn't obviously).
As RegDeleteTree is a Vista function (and thus not officially there yet), I'm not sure how Alexandre would react to this. Of course we need some conformance tests for this, but the only OS's where it will run will be Vista and Wine. I'm not sure whether winetest can cope with Vista yet.
I'd say go for it and use one of the many implementations we already have as a base. Maybe the best one is SHDeleteKey as that's an official one (with tests already) and you'd only have to leave out the last RegDeleteKey.
Cheers,
Paul.