Reg OpenKey

Description

This API function opens an existing key.

The previous function, RegEnumKeyEx, is recommended on Win32.

Declaration

Declare Function RegOpenKey Lib "advapi3 2.dll" _ Alias "RegOpenKeyA" ( _ ByVal hKey As Long, _ ByVal lpSubKey As String, _ phkResult As Long) As Long

Parameters

Parameter

Description

Hkey

Long Integer—The handle of the key to open, or one of the hive constants listed above.

LpSubKey

String—The name of the key to open.

PhkResult

Long Integer—A variable that is loaded with a handle to the new key.

Return value

Long Integer

Zero (ERROR_SUCCESS) on success. All other values are the specific error code.

0 0

Post a comment