RegistryKey: GetValue

GetValue

Returns the value of a key within a SubKey.



 Public Function GetValue(
	  ByRef Name As String,
	  Optional ByRef Default As Variant,
	  Optional ByVal Options As RegistryValueOptions ) As Variant

Parameters

Name
[ByRef] String. The name of the value to retrieve, or an empty string to retrieve the key default value.
Default
[ByRef] Optional. Variant. The value to be returned if the key name was not found.
Options
[ByVal] Optional. RegistryValueOptions. Additional options on how to handle how data is handled when reading from the key.

Return Values

Variant -  The value found in the Registry, or Empty if the value does not exist.

Remarks

RegistryKey supports the return of 6 different key value types.
REG_DWORD (Integer numbers)
REG_QWORD (64-bit integer)
REG_BINARY (Byte arrays)
REG_SZ (Strings)
REG_MULTI_SZ (String arrays)
REG_EXPAND_SZ (String containing an environment variable)
The specific type will be created and returned based on the type in the registry.

If retrieving a REG_QWORD, a vbCurrency variable is returned to represent the 64-bit value. This means that the value will have the bias of being divided by 10000. To get the true 64-bit value, the vbCurrency value will need to be multiplied by 10000. The result may be an overflow.

See Also

Project CorLib Overview

Class RegistryKey Overview