|
RegRead Method |
|
Description
Returns the value of a key or value-name from the registry.
PowerBASIC Syntax
Arguments
Return Value
VARIANT. The RegRead method returns a variant value.
Remarks
The RegRead method returns values of the following five types.
You can specify a key-name by ending bstrName with a final backslash. Do not include a final backslash to specify a value-name. A value entry has three parts: its name, its data type, and its value. When you specify a key-name (as opposed to a value-name), RegRead returns the default value. To read a key's default value, specify the name of the key itself. Fully qualified key-names and value-names begin with a root key. You may use abbreviated versions of root key names with the RegRead method. The five possible root keys are listed in the following table.
Example [PowerBASIC]
#INCLUDE "WSHOM.INC"
DIM pWsh AS IWshShell DIM vValue AS VARIANT
pWsh = NEWCOM "WScript.Shell" vValue = pWsh.RegRead (UCODE$("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\ CentralProcessor\0\ProcessorNameString")) STDOUT VARIANT$(vValue)
|
