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 REGEXPANDSZ the returned value is <b>not</b> expanded; `valueEXPANDSZ` 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 } ----
Key m_keystring 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 } ----
Key m_keyAn enumerable sequence representing the names of the values of a registry Key.
Example: ---- Key key = ... foreach (string valueName; key.valueNames) { // using valueName } ----
Key m_keystring 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 } ----
Key m_keyvoid enforceSucc(LONG res, lazy string message, string fn = __FILE__, size_t ln = __LINE__)bool haveWoW64Job(in REGSAM samDesired)Returns true, if we are in WoW64 mode and have WoW64 flagsHKEY regCreateKey(in HKEY hkey, in string subKey, in DWORD dwOptions, in REGSAM samDesired,
in LPSECURITY_ATTRIBUTES lpsa, out DWORD disposition)LONG regEnumValueName(in HKEY hkey, in DWORD dwIndex, ref wchar[] name, out DWORD cchName)void regQueryValue(in HKEY hkey, in string name, out string[] value, REG_VALUE_TYPE reqType)void regQueryValue(in HKEY hkey, in string name, out byte[] value, REG_VALUE_TYPE reqType)void regSetValue(in HKEY hkey, in string subKey, in REG_VALUE_TYPE type, in LPCVOID lpData, in DWORD cbData)void regProcessNthKey(Key key, scope void delegate(scope LONG delegate(DWORD, out string)) dg)void regProcessNthValue(Key key, scope void delegate(scope LONG delegate(DWORD, out string)) dg)