Doc Comments / Phobos /
Std CWindows Registry
std.windows.registry
![]() |
|
Documentation
Based on documentation generated by:
dmd registry.d -D -c -o-std/windows/registry.d This file contains the \c std.windows.registry.* classes
alias boolean;
- A strongly-typed Boolean
- An enumeration representing byte-ordering (Endian) strategies
- The registry key handle
- Enumeration of the recognised registry access modes
- Enumeration of the recognised registry value types
- Exception class thrown by the std.windows.registry classes
- this(char[] message);
- Creates an instance of the exception
- message: The message associated with the exception
- Creates an instance of the exception
- this(char[] message, int error);
- Creates an instance of the exception, with the given
- message: The message associated with the exception
- error: The Win32 error number associated with the exception
- Creates an instance of the exception, with the given
- This class represents a registry key
- char[] name();
- The name of the key
- The name of the key
- uint keyCount();
- The number of sub keys
- The number of sub keys
- KeySequence keys();
- An enumerable sequence of all the sub-keys of this key
- An enumerable sequence of all the sub-keys of this key
- KeyNameSequence keyNames();
- An enumerable sequence of the names of all the sub-keys of this key
- An enumerable sequence of the names of all the sub-keys of this key
- uint valueCount();
- The number of values
- The number of values
- ValueSequence values();
- An enumerable sequence of all the values of this key
- An enumerable sequence of all the values of this key
- ValueNameSequence valueNames();
- An enumerable sequence of the names of all the values of this key
- An enumerable sequence of the names of all the values of this key
- Key createKey(char[] name, REGSAM access);
- Returns the named sub-key of this key
- name: The name of the subkey to create. May not be null
- Returns: The created key
- Note: If the key cannot be created, a RegistryException is thrown.
- Returns the named sub-key of this key
- Key createKey(char[] name);
- Returns the named sub-key of this key
- name: The name of the subkey to create. May not be null
- Returns: The created key
- Note: If the key cannot be created, a RegistryException is thrown.
- Note: This function is equivalent to calling CreateKey?(name, REGSAM.{KEY ALL ACCESS}?), and returns a key with all access
- Returns the named sub-key of this key
- Key getKey(char[] name, REGSAM access);
- Returns the named sub-key of this key
- name: The name of the subkey to aquire. If name is null (or the empty-string), then the called key is duplicated
- access: The desired access; one of the REGSAM enumeration
- Returns: The aquired key.
- Note: This function never returns null. If a key corresponding to the requested name is not found, a RegistryException is thrown
- Returns the named sub-key of this key
- Key getKey(char[] name);
- Returns the named sub-key of this key
- name: The name of the subkey to aquire. If name is null (or the empty-string), then the called key is duplicated
- Returns: The aquired key.
- Note: This function never returns null. If a key corresponding to the requested name is not found, a RegistryException is thrown
- Note: This function is equivalent to calling GetKey?(name, REGSAM.{KEY READ}?), and returns a key with read/enum access
- Returns the named sub-key of this key
- void deleteKey(char[] name);
- Deletes the named key
- name: The name of the key to delete. May not be null
- Deletes the named key
- Value getValue(char[] name);
- Returns the named value
- Note: if name is null (or the empty-string), then the default value is returned
- Returns: This function never returns null. If a value corresponding to the requested name is not found, a RegistryException? is thrown
- Returns the named value
- void setValue(char[] name, uint value);
- Sets the named value with the given 32-bit unsigned integer value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The 32-bit unsigned value to set
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given 32-bit unsigned integer value
- void setValue(char[] name, uint value, Endian endian);
- Sets the named value with the given 32-bit unsigned integer value, according to the desired byte-ordering
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The 32-bit unsigned value to set
- endian: Can be Endian.Big or Endian.Little
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given 32-bit unsigned integer value, according to the desired byte-ordering
- void setValue(char[] name, ulong value);
- Sets the named value with the given 64-bit unsigned integer value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The 64-bit unsigned value to set
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given 64-bit unsigned integer value
- void setValue(char[] name, char[] value);
- Sets the named value with the given string value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The string value to set
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given string value
- void setValue(char[] name, char[] value, int asEXPAND_SZ);
- Sets the named value with the given string value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The string value to set
- asEXPAND_SZ: If true, the value will be stored as an expandable environment string, otherwise as a normal string
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given string value
- void setValue(char[] name, char[][] value);
- Sets the named value with the given multiple-strings value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The multiple-strings value to set
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given multiple-strings value
- void setValue(char[] name, byte[] value);
- Sets the named value with the given binary value
- name: The name of the value to set. If null, or the empty string, sets the default value
- value: The binary value to set
- Note: If a value corresponding to the requested name is not found, a RegistryException is thrown
- Sets the named value with the given binary value
- void deleteValue(char[] name);
- Deletes the named value
- name: The name of the value to delete. May not be null
- Note: If a value of the requested name is not found, a RegistryException? is thrown
- Deletes the named value
- void flush();
- Flushes any changes to the key to disk
- Flushes any changes to the key to disk
- This class represents a value of a registry key
- char[] name();
- The name of the value.
- Note: If the value represents a default value of a key, which has no name, the returned string will be of zero length
- The name of the value.
- REG_VALUE_TYPE type();
- The type of value
- The type of value
- char[] value_SZ();
- Obtains the current value of the value as a string.
- Returns: The contents of the value
- Note: If the value's type is REG_EXPAND_SZ the returned value is not expanded; Value_EXPAND_SZ() should be called
- Note: Throws a RegistryException if the type of the value is not REG_SZ, REG_EXPAND_SZ, REG_DWORD(*) or REG_QWORD(*):
- Obtains the current value of the value as a string.
- char[] value_EXPAND_SZ();
- Obtains the current value as a string, within which any environment variables have undergone expansion
- Returns: The contents of the value
- Note: This function works with the same value-types as {Value SZ}?().
- Obtains the current value as a string, within which any environment variables have undergone expansion
- char[][] value_MULTI_SZ();
- Obtains the current value as an array of strings
- Returns: The contents of the value
- Note: Throws a RegistryException if the type of the value is not REG_MULTI_SZ
- Obtains the current value as an array of strings
- uint value_DWORD();
- Obtains the current value as a 32-bit unsigned integer, ordered correctly according to the current architecture
- Returns: The contents of the value
- Note: An exception is thrown for all types other than REG_DWORD, REG_DWORD_LITTLE_ENDIAN and REG_DWORD_BIG_ENDIAN.
- Obtains the current value as a 32-bit unsigned integer, ordered correctly according to the current architecture
- ulong value_QWORD();
- Obtains the value as a 64-bit unsigned integer, ordered correctly according to the current architecture
- Returns: The contents of the value
- Note: Throws a RegistryException if the type of the value is not {REG QWORD}?
- Obtains the value as a 64-bit unsigned integer, ordered correctly according to the current architecture
- byte[] value_BINARY();
- Obtains the value as a binary blob
- Returns: The contents of the value
- Note: Throws a RegistryException if the type of the value is not {REG BINARY}?
- Obtains the value as a binary blob
- Represents the local system registry.
- static Key classesRoot();
- Returns the root key for the HKEY_CLASSES_ROOT hive
- Returns the root key for the HKEY_CLASSES_ROOT hive
- static Key currentUser();
- Returns the root key for the HKEY_CURRENT_USER hive
- Returns the root key for the HKEY_CURRENT_USER hive
- static Key localMachine();
- Returns the root key for the HKEY_LOCAL_MACHINE hive
- Returns the root key for the HKEY_LOCAL_MACHINE hive
- static Key users();
- Returns the root key for the HKEY_USERS hive
- Returns the root key for the HKEY_USERS hive
- static Key performanceData();
- Returns the root key for the HKEY_PERFORMANCE_DATA hive
- Returns the root key for the HKEY_PERFORMANCE_DATA hive
- static Key currentConfig();
- Returns the root key for the HKEY_CURRENT_CONFIG hive
- Returns the root key for the HKEY_CURRENT_CONFIG hive
- static Key dynData();
- Returns the root key for the HKEY_DYN_DATA hive
- Returns the root key for the HKEY_DYN_DATA hive
- An enumerable sequence representing the names of the sub-keys of a registry Key
- It would be used as follows:
Key key = . . .foreach(char[] kName; key.SubKeys) { process_Key(kName); }
- uint count();
- The number of keys
- The number of keys
- char[] getKeyName(uint index);
- The name of the key at the given index
- index: The 0-based index of the key to retrieve
- Returns: The name of the key corresponding to the given index
- Note: Throws a RegistryException? if no corresponding key is retrieved
- The name of the key at the given index
- char[] opIndex(uint index);
- The name of the key at the given index
- index: The 0-based index of the key to retrieve
- Returns: The name of the key corresponding to the given index
- Note: Throws a RegistryException if no corresponding key is retrieved
- The name of the key at the given index
- An enumerable sequence representing the sub-keys of a registry Key
- It would be used as follows:
Key key = . . .foreach(Key k; key.SubKeys) { process_Key(k); }
- uint count();
- The number of keys
- The number of keys
- Key getKey(uint index);
- The key at the given index
- index: The 0-based index of the key to retrieve
- Returns: The key corresponding to the given index
- Note: Throws a RegistryException if no corresponding key is retrieved
- The key at the given index
- Key opIndex(uint index);
- The key at the given index
- index: The 0-based index of the key to retrieve
- Returns: The key corresponding to the given index
- Note: Throws a RegistryException if no corresponding key is retrieved
- The key at the given index
- An enumerable sequence representing the names of the values of a registry Key
- It would be used as follows:
Key key = . . .foreach(char[] vName; key.Values) { process_Value(vName); }
- uint count();
- The number of values
- The number of values
- char[] getValueName(uint index);
- The name of the value at the given index
- index: The 0-based index of the value to retrieve
- Returns: The name of the value corresponding to the given index
- Note: Throws a RegistryException if no corresponding value is retrieved
- The name of the value at the given index
- char[] opIndex(uint index);
- The name of the value at the given index
- index: The 0-based index of the value to retrieve
- Returns: The name of the value corresponding to the given index
- Note: Throws a RegistryException if no corresponding value is retrieved
- The name of the value at the given index
- An enumerable sequence representing the values of a registry Key
- It would be used as follows:
Key key = . . .foreach(Value v; key.Values) { process_Value(v); }
- uint count();
- The number of values
- The number of values
- Value getValue(uint index);
- The value at the given index
- index: The 0-based index of the value to retrieve
- Returns: The value corresponding to the given index
- Note: Throws a RegistryException if no corresponding value is retrieved
- The value at the given index
- Value opIndex(uint index);
- The value at the given index
- index: The 0-based index of the value to retrieve
- Returns: The value corresponding to the given index
- Note: Throws a RegistryException if no corresponding value is retrieved
- The value at the given index
Links
Registry Enumeration
Apparent Stack Corruption with std.windows.registry (Fix)
- Filed as
Issue:961 (
NG:digitalmars.D.bugs/10361).