Click or drag to resize

QueryRTRegString Function

X#
Retrieve a string value from the Registry.

Namespace:  XSharp.VO
Assembly:  XSharp.VO (in XSharp.VO.dll) Version: 2.19
Syntax
 FUNCTION QueryRTRegString(
	cSubKey AS STRING,
	cKey AS STRING
) AS STRING
Request Example View Source

Parameters

cSubKey
Type: String
cKey
Type: String
The key under which you want to search for a string value.

Return Value

Type: String
cValue if the entry cKey = cValue exists; otherwise, zero.
Remarks
QueryRTRegString() searches within the Registry under following key: HKEY_CURRENT_USER \\Software \\ComputerAssociates \\CA-Visual Objects Applications \\cSubkey Or: HKEY_LOCAL_MACHINE \\Software \\ComputerAssociates \\CA-Visual Objects Applications \\cSubkey QueryRTRegInt() tries to read from the HKEY_CURRENT_USER first. When the key is not found under HKEY_CURRENT_USER then it tries to read from HKEY_LOCAL_MACHINE
Examples
This example uses QueryRTRegString() to obtain the value associated with the APP_DIR Registry entry under the subkey SSA.
The resulting directory name is appended to a database file name before the file is opened:
X#
1cDbf:=QueryRTRegString("SSA","APP_DIR") + "test.dbf"
2USE (cDbf)
3...
See Also