Click or drag to resize

SetRTRegString Function

X#
Save a string value to the Registry.

Namespace:  XSharp.VO
Assembly:  XSharp.VO (in XSharp.VO.dll) Version: 2.21
Syntax
 FUNCTION SetRTRegString(
	cSubKey AS STRING,
	cKey AS STRING,
	cValue AS STRING
) AS LOGIC
Request Example View Source

Parameters

cSubKey
Type: String
cKey
Type: String
The key under which you want to add the string.
cValue
Type: String
The key value you want to add to the Registry.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
SetRTRegString() can be used to save runtime settings into the Registry.
The value will be saved as cKey = dwKeyValue under the following key: HKEY_CURRENT_USER \\Software \\ComputerAssociates \\CA-Visual Objects Applications \\cSubkey and optionally under HKEY_LOCAL_MACHINE \\Software \\ComputerAssociates \\CA-Visual Objects Applications \\cSubkey If cSubkey is empty (NULL_STRING), the Registry entry will be saved without a subkey under: HKEY_LOCAL_MACHINE \\Software \\ComputerAssociates \\CA-Visual Objects Applications SetRTRegString() only writes to HKEY_LOCAL_MACHINE if the key already exists (and ignores write errors). It always writes to HKEY_CURRENT_USER as well. The return value reflects the result of the write operation to HKEY_CURRENT_USER
Examples
This example adds the entry APP_DIR = \SSA\ to the Registry under the subkey SSA:
X#
1SetRTRegString("SSA", "APP_DIR", "\SSA\")
2...
3cDbf:=QueryRTRegString("SSA","APP_DIR") + "test.dbf"
4USE (cDbf)
5...
See Also