AIT_RegKeyExists

Description

Checks whether the specified registry key exists.

Format

integer AIT_RegKeyExists(
 integer nHKeyHandle,       // Key handle
 string strRegKeyName       // Registry sub-key name
);

Parameters

nHKeyHandle (input)

Specify a handle to an already opened registry key.

strRegKeyName (input)

Specify the name of a registry sub-key to check if it exists.

Return values

The return value is 1 if the key exists, 0 if not, and -1 if the function has not been processed successfully.

If the function has returned -1, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
2ERROR_FILE_NOT_FOUND
6ERROR_INVALID_HANDLE
87ERROR_INVALID_PARAMETER
1009ERROR_BADDB
1010ERROR_BADKEY
1011ERROR_CANTOPEN
1015ERROR_REGISTRY_CORRUPT
1016ERROR_REGISTRY_IO_FAILED
1019ERROR_NO_LOG_SPACE