summaryrefslogtreecommitdiffstats
path: root/Doc/library/winreg.rst
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-04-21 23:56:21 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-04-21 23:56:21 (GMT)
commit3035c3925c8499a37f8c845997360b3c4d0502f6 (patch)
tree429e43b7d566bfe62e3ca254b736d6a422eecb79 /Doc/library/winreg.rst
parent2f67fa2962eb468d3f918773233273f16c4c30b4 (diff)
downloadcpython-3035c3925c8499a37f8c845997360b3c4d0502f6.zip
cpython-3035c3925c8499a37f8c845997360b3c4d0502f6.tar.gz
cpython-3035c3925c8499a37f8c845997360b3c4d0502f6.tar.bz2
Port #7347 to py3k.
Add CreateKeyEx and DeleteKeyEx, along with test improvements.
Diffstat (limited to 'Doc/library/winreg.rst')
-rw-r--r--Doc/library/winreg.rst104
1 files changed, 101 insertions, 3 deletions
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
index 473bfe3..3481b0d 100644
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -61,15 +61,40 @@ This module offers the following functions:
:exc:`WindowsError` exception is raised.
+.. function:: CreateKeyEx(key, sub_key, res=0, sam=KEY_ALL_ACCESS)
+
+ Creates or opens the specified key, returning a :dfn:`handle object`
+
+ *key* is an already open key, or one of the predefined :const:`HKEY_\*`
+ constants.
+
+ *sub_key* is a string that names the key this method opens or creates.
+
+ *res* is a reserved integer, and must be zero. The default is zero.
+
+ *sam* is an integer that specifies an access mask that describes the desired
+ security access for the key. Default is :const:`KEY_ALL_ACCESS`
+
+ If *key* is one of the predefined keys, *sub_key* may be ``None``. In that
+ case, the handle returned is the same key handle passed in to the function.
+
+ If the key already exists, this function opens the existing key.
+
+ The return value is the handle of the opened key. If the function fails, a
+ :exc:`WindowsError` exception is raised.
+
+.. versionadded:: 3.2
+
+
.. function:: DeleteKey(key, sub_key)
Deletes the specified key.
- *key* is an already open key, or any one of the predefined :const:`HKEY_\*`
+ *key* is an already open key, or any one of the predefined :const:`HKEY_\*`
constants.
- *sub_key* is a string that must be a subkey of the key identified by the *key*
- parameter. This value must not be ``None``, and the key may not have subkeys.
+ *sub_key* is a string that must be a subkey of the key identified by the *key*
+ parameter. This value must not be ``None``, and the key may not have subkeys.
*This method can not delete keys with subkeys.*
@@ -77,6 +102,37 @@ This module offers the following functions:
If the method fails, a :exc:`WindowsError` exception is raised.
+.. function:: DeleteKeyEx(key, sub_key, sam=KEY_WOW64_64KEY, res=0)
+
+ Deletes the specified key.
+
+ .. note::
+ The :func:`DeleteKeyEx` function is implemented with the RegDeleteKeyEx
+ Windows API function, which is specific to 64-bit versions of Windows.
+ See http://msdn.microsoft.com/en-us/library/ms724847%28VS.85%29.aspx
+
+ *key* is an already open key, or any one of the predefined :const:`HKEY_\*`
+ constants.
+
+ *sub_key* is a string that must be a subkey of the key identified by the
+ *key* parameter. This value must not be ``None``, and the key may not have
+ subkeys.
+
+ *res* is a reserved integer, and must be zero. The default is zero.
+
+ *sam* is an integer that specifies an access mask that describes the
+ desired security access for the key. Default is :const:`KEY_WOW64_64KEY`
+
+ *This method can not delete keys with subkeys.*
+
+ If the method succeeds, the entire key, including all of its values, is
+ removed. If the method fails, a :exc:`WindowsError` exception is raised.
+
+ On unsupported Windows versions, :exc:`NotImplementedError` is raised.
+
+.. versionadded:: 3.2
+
+
.. function:: DeleteValue(key, value)
Removes a named value from a registry key.
@@ -374,6 +430,48 @@ This module offers the following functions:
registry. This helps the registry perform efficiently.
+.. function:: DisableReflectionKey(key)
+
+ Disables registry reflection for 32-bit processes running on a 64-bit
+ Operating System.
+
+ *key* is an already open key, or one of the predefined :const:`HKEY_\*`
+ constants.
+
+ Will generally raise :exc:`NotImplemented` if executed on a 32-bit
+ Operating System.
+
+ If the key is not on the reflection list, the function succeeds but has no
+ effect. Disabling reflection for a key does not affect reflection of any
+ subkeys.
+
+
+.. function:: EnableReflectionKey(key)
+
+ Restores registry reflection for the specified disabled key.
+
+ *key* is an already open key, or one of the predefined :const:`HKEY_\*`
+ constants.
+
+ Will generally raise :exc:`NotImplemented` if executed on a 32-bit
+ Operating System.
+
+ Restoring reflection for a key does not affect reflection of any subkeys.
+
+
+.. function:: QueryReflectionKey(key)
+
+ Determines the reflection state for the specified key.
+
+ *key* is an already open key, or one of the predefined :const:`HKEY_\*`
+ constants.
+
+ Returns ``True`` if reflection is disabled.
+
+ Will generally raise :exc:`NotImplemented` if executed on a 32-bit
+ Operating System.
+
+
.. _handle-object:
Registry Handle Objects