RegistryItem.Value
From Xojo Documentation
This method is only available on the Windows platform. For cross-platform compatibility, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this method on an incompatible platform. |
Gets the RegistryItem value using its Name and returns the value as a Variant. See the Notes section for RegistryItem.
If the value does not exist, nil is returned.
Gets the RegistryItem value using its Index and returns the value as a Variant. If Index is greater than KeyCount, then an OutofBoundsException is raised.
Sets the RegistryItem by the passed Name.
Sets the RegistryItem value by the passed Index. If Index is greater or equal than KeyCount, then an OutofBoundsException is raised. Index is zero based.
Notes
When assigning Integer literal values, keep in mind that the Integer type size varies between 32-bit and 64-bit builds. In 32-bit builds, an Integer literal is 32-bit which results in a DWORD value set. In 64-bit builds an Integer literal is 64-bit which results in a QWORD value set. If your Registry value needs to be a DWORD in a 64-bit app, be sure to specifically set the Integer value type to 32-bit. You can do this using a specifically typed variable or the CType command:
Var value As Int32 = 1100
reg.Value(App.ExecutableFile.Name) = value
// Set type using CType
reg.Value(App.ExecutableFile.Name) = CType(11000, Int32)
Examples
To create a binary key, use a MemoryBlock: