_winreg doc unclear on DeleteValue()

R

rtilley

A portion from the _winreg Documnetation:
-----------------------------------------------------------------
DeleteValue(key, value)
1. Removes a named value from a registry key. --> OK
2. key is an already open key, or one of the predefined HKEY_*
constants. --> OK
3. value is a string that identifies the value to remove. -->
misleading
------------------------------------------------------------------

When I use EnumValue like this:

Value_Name, Value, Type = EnumValue(key, index)

I expect to use DeleteValue like this (as per the docs):

DeleteValue(open_run_key, Value)

When in fact, I should use it like this:

DeleteValue(open_run_key, Value_Name)

Perhaps this is nitpicking and I'm the only person in the world that
finds the docs a bit mis-leading here, if so, just disregard this post.

rbt
 
D

Dennis Lee Bieber

3. value is a string that identifies the value to remove. -->
misleading
Perhaps this is nitpicking and I'm the only person in the world that
finds the docs a bit mis-leading here, if so, just disregard this post.
The key word, I think, is "identifies".

It is NOT a copy of the key value itself, but the identifier of that
value; ie, the name...

A value, itself, could appear in more than one entry -- how would
you tell which one was to be removed, except by the name.
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top