GetValue
Previous  Next

Returns the actual value of the specified value in the subkey.
Syntax: GetValue (SubKey As String, ValueName As String) As Object
GetValue can return four different types of data:
String - If the value is of type REG_SZ.
Integer - If the value is of type REG_DWORD
Bytes Array - If the value is of type REG_BINARY.
String Array - If the value is of type REG_MULTI_SZ.

Example:
'Add a Registry object named reg.
Sub Globals
      dim files(0) As String
      dim binary(0) As Byte
End Sub

Sub App_Start
      reg.New1
      reg.RootKey(reg.rtCurrentUser)
      key = "Software\My Application"
      number = reg.GetValue(key, "Number Of Items") 'Number Of Items is of type REG_DWORD
      name = reg.GetValue(key, "User Name") 'User Name is of type REG_SZ
      files() = reg.GetValue(key, "RecentFiles") 'Recent file is of type REG_MULTI_SZ (multi - string)
      binary() = reg.GetValue(key,"BinaryValue") 'BinaryValue is of type REG_BINARY
End Sub