QueryRTRegInt Function | |
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
public static uint QueryRTRegInt(
string cSubKey,
string cKey
)
Request Example
View SourceParameters
- cSubKey
- Type: String
- cKey
- Type: String
The key under which you want to search for a numeric value.
Return Value
Type:
DWorddwValue 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:
1nRetries := QueryRTRegInt("SSA", "LOCK_RETRIES")
2DO WHILE nRetries > 0
3 IF RLock()
4 EXIT
5 ENDIF
6 nRetries--
7ENDDO
8IF nRetries = 0
9
10ENDIF
11...
See Also