QueryRTRegString Function | |
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
public static string QueryRTRegString(
string cSubKey,
string cKey
)
Request Example
View SourceParameters
- cSubKey
- Type: String
- cKey
- Type: String
The key under which you want to search for a string value.
Return Value
Type:
StringcValue 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:
1cDbf:=QueryRTRegString("SSA","APP_DIR") + "test.dbf"
2USE (cDbf)
3...
See Also