Click or drag to resize

QueryRTRegInt Function

X#
Retrieve a numeric value from the Registry.

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

Parameters

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

Return Value

Type: DWord
dwValue if the entry cKey = dwValue exists; otherwise, zero.
Remarks
QueryRTRegInt() searches within the Registry under the 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 QueryRTRegInt() to obtain the value associated with the LOCK_RETRIES Registry entry under the subkey SSA.
The resulting value is used in a DO WHILE loop, determining how many times the RLock() operation is attempted:
X#
 1nRetries := QueryRTRegInt("SSA", "LOCK_RETRIES")
 2DO WHILE nRetries > 0
 3    IF RLock()
 4        EXIT
 5    ENDIF
 6    nRetries--
 7ENDDO
 8IF nRetries = 0
 9    // Error message
10ENDIF
11...
See Also