win32api.RegOpenKeyEx

PyHKEY = RegOpenKeyEx(key, subKey , reserved , sam )

Opens the specified key.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of a key that this method opens. This key must be a subkey of the key identified by the key parameter. If key is one of the predefined keys, subKey may be None. In that case, the handle returned is the same key handle passed in to the function.

reserved=0 : int

Reserved. Must be zero.

sam=KEY_READ : int

Specifies an access mask that describes the desired security access for the new key. This parameter can be a combination of the following win32con constants:
KEY_ALL_ACCESS
KEY_CREATE_LINK
KEY_CREATE_SUB_KEY
KEY_ENUMERATE_SUB_KEYS
KEY_EXECUTE
KEY_NOTIFY
KEY_QUERY_VALUE
KEY_READ
KEY_SET_VALUE
KEY_WRITE

Win32 API References

Search for RegOpenKeyEx at msdn, google or google groups.

Return Value

The return value is the handle of the opened key. If the function fails, an exception is raised.