PyHKEY = RegCreateKey(key, subKey )

Creates the specified key, or opens the key if it already exists.


key : PyHKEY/int

An already open key, or any one of the following win32con constants:

subKey : string

The name of a key that this method opens or creates. 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 hkey handle passed in to the function.

Win32 API References

Search for RegCreateKey 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.