NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RegistryKey.CreateSubKey

Creates a new subkey or opens an existing subkey. The string subKey is not case sensitive.

[Visual Basic]
Public Function CreateSubKey( _
   ByVal subkey As String _
) As RegistryKey
[C#]
public RegistryKey CreateSubKey(
   string subkey
);
[C++]
public: RegistryKey* CreateSubKey(
   String* subkey
);
[JScript]
public function CreateSubKey(
   subkey : String
) : RegistryKey;

Parameters

subkey
Name or path of subkey to create or open.

Return Value

Returns the subkey or null if the operation failed.

Exceptions

Exception Type Condition
ArgumentNullException If subkey is null.
SecurityException if the user does not have RegistryPermission.SetInclude(create, currentKey) or RegistryPermission.SetInclude(open, currentKey) access.

Remarks

The user must have permission at this level and below.

See Also

RegistryKey Class | RegistryKey Members | Microsoft.Win32 Namespace