Written by Matthew Wilson
License
Author: Matthew Wilson, Kenji Hara
History
Updated 25th April 2004,
Source: std/windows/registry.d
This library provides Win32 Registry facilities.
Written by Matthew Wilson
Author: Matthew Wilson, Kenji Hara
Updated 25th April 2004,
Source: std/windows/registry.d
Exception class thrown by the std.windows.registry classes.
Enumeration of the recognised registry access modes.
Enumeration of the recognised registry value types.
This class represents a registry key.
KeyNameSequence keyNames() @property @safe pureAn enumerable sequence of the names of all the sub-keys of this key.ValueNameSequence valueNames() @property @safe pureAn enumerable sequence of the names of all the values of this key.Key createKey(string name, REGSAM access = REGSAM.KEY_ALL_ACCESS)Returns the named sub-key of this key.Value getValue(string name)Returns the named value. If `name` is the empty string, then the default value is returned.void setValue(string name, uint value)Sets the named value with the given 32-bit unsigned integer value.void setValue(string name, uint value, Endian endian)Sets the named value with the given 32-bit unsigned integer value, according to the desired byte-ordering.void setValue(string name, ulong value)Sets the named value with the given 64-bit unsigned integer value.void setValue(string name, string value)Sets the named value with the given string value.void setValue(string name, string value, bool asEXPAND_SZ)Sets the named value with the given string value.void setValue(string name, string[] value)Sets the named value with the given multiple-strings value.void setValue(string name, byte[] value)Sets the named value with the given binary value.void deleteValue(string name)Deletes the named value.void flush()Flushes any changes to the key to disk.This class represents a value of a registry key.
string name() @property @safe pure nothrow constThe name of the value. If the value represents a default value of a key, which has no name, the returned string will be of zero length.string value_SZ() @property constObtains the current value of the value as a string. If the value's type is REG_EXPAND_SZ the returned value is <b>not</b> expanded; `value_EXPAND_SZ` should be calledstring value_EXPAND_SZ() @property constObtains the current value as a string, within which any environment variables have undergone expansion. This function works with the same value-types as `value_SZ`.uint value_DWORD() @property constObtains the current value as a 32-bit unsigned integer, ordered correctly according to the current architecture.ulong value_QWORD() @property constObtains the value as a 64-bit unsigned integer, ordered correctly according to the current architecture.this(Key key, string name, REG_VALUE_TYPE type)An enumerable sequence representing the names of the sub-keys of a registry Key.
Example:
Key key = ...
foreach (string subkeyName; key.keyNames)
{
// using subkeyName
}string getKeyName(size_t index)The name of the key at the given index.string opIndex(size_t index)The name of the key at the given index.int opApply(scope int delegate(ref string name) dg)An enumerable sequence representing the sub-keys of a registry Key.
Example:
Key key = ...
foreach (Key subkey; key.keys)
{
// using subkey
}An enumerable sequence representing the names of the values of a registry Key.
Example:
Key key = ...
foreach (string valueName; key.valueNames)
{
// using valueName
}string getValueName(size_t index)The name of the value at the given index.string opIndex(size_t index)The name of the value at the given index.int opApply(scope int delegate(ref string name) dg)An enumerable sequence representing the values of a registry Key.
Example:
Key key = ...
foreach (Value value; key.values)
{
// using value
}