Get_Foreign_Profile_String
Obsolete
This command is obsolete. Use the cRegistry class for accessing the Windows Registry in DataFlex.
Purpose
To return the value of a setting from the Registry.
Syntax
Get_Foreign_Profile_String {key-name} {sub-keyname} {value-name} To {variable}
Argument Explanation
-
sKeyname: The name of a key within the registry. The fully-qualified keyname of the specified key is found by concatenating the branch parameter of the
SET_REGISTRY_ROOTcommand (default = "Software") with the contents of the keyname parameter and the contents of the subkeyname parameter. If the key doesn't exist, "Defaults" is searched for a subkey of subkeyname. -
sSubkeyname: The name of the subkey within keyname to be set. See the description of keyname for how to assemble the fully-qualified registry key name.
-
sValuename: A value name defined in the key keyname.
-
variable: A string variable into which the content of the registry value is stored.
What It Does
Get_Foreign_Profile_String returns a value stored in the registry.
Example
// Strings to hold paths.
String sRegPath sKey sValueName sValueData
// Set the registry root.
Set_Registry_Root to HKEY_LOCAL_MACHINE 'Software'
Move 'Classes' to sRegPath
Move '.Html' to sKey
Move 'Content Type' to sValueName
Get_Foreign_Profile_String sRegPath sKey sValueName to sValueData
Showln "Path = " sRegPath "\" sKey ", Value is " sValueName;
", Data is " sValueData
// Find a key that's in a little deeper.
Move 'Clients\Mail\Exchange\Shell\Open' to sRegPath
Move 'Command' to sKey
Move '' to sValueName // Get default value.
Get_Foreign_Profile_String sRegPath sKey sValueName to sValueData
Showln "Path = " sRegPath "\" sKey ", Value is " sValueName;
", Data is " sValueData
Notes
-
If no subkey is found for the supplied keysKeyName, the defaults key, [Defaults], is searched.
-
If no value is found in the key specified for the value name specified, an empty string is returned.
-
The system will perform type conversion if the variable that receives the value is not a string.