Re: deleting a registry ke

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



you can only delete a key if there are no subkeys. so, if you want to do this in a driver you have to enumerate all of the subkeys recursively and delete every one of them. this is what regedit does. BUT, this should not be done in the driver, recursion is not good b/c there is very limited stack space and the interfaces are a bit more difficult to deal with compared to user mode (for instance there is a RegDeleteTree in Vista which does it all for you instead of recursing). the reset to a default config should really be done by a UM helper application/service.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Brian" <Brian@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:34A3931F-4AE8-4E3F-8EC9-6D652CDA22A7@xxxxxxxxxxxxxxxx
I save some device specific information in the registry that is created with
ACCESS_ALL. Sometimes it is necessary go back to default configuration, so I
would like to delete the information. I am opening an handle to the key and
calling ZwDeleteKey, but I get an error with the status that I can't delete
it (0xC0000121). The information has a tree structure (the key itself
contains sub keys) and it also contains values. Is this the reason the
delete fails? I can delete the node easily enough using regedit, why can't I
delete it in my driver entry?

.



Relevant Pages

  • Sound, dual soundcards, second attempt (better I hope)
    ... PCI: PCI BIOS revision 2.10 entry at 0xfdb01, ... Journalled Block Device driver loaded ... usb.c: new USB bus registered, ... alias char-major-10-175 agpgart ...
    (comp.os.linux)
  • Re: Starting a driver
    ... Please do not send e-mail directly to this alias. ... msvad to know if you can do what you want, but the underlying bth radio will ... >> the bluetooth stack "starts" the btaudio driver by enumerating the>> audio ...
    (microsoft.public.development.device.drivers)
  • Re: DDK bug? moufiltr installation
    ... Please do not send e-mail directly to this alias. ... > I will also try the lower filter option. ... > server DDK) but not hidclass source code. ... Where can I get hidclass driver ...
    (microsoft.public.development.device.drivers)
  • Re: USB HID Absolute Positioning Mouse Resolution Issues
    ... Please do not send e-mail directly to this alias. ... > emulate an input device from user space (using uinput kernel driver). ... >>> We also have a need similar to yours as we will be emulating a USB ... >>> absolute ...
    (microsoft.public.development.device.drivers)
  • Re: How to break from a deadlock...
    ... Changing the state is only half the battle, you then need the scheduler to ... Please do not send e-mail directly to this alias. ... Each time this happens, my driver keeps running, waiting on this ...
    (microsoft.public.development.device.drivers)