_RegOpenKey


include vmm.h

LONG _RegOpenKey(HKEY hkey, LPTSTR lpszSubKey, PHKEY phkResult)

Opens the specified key. Caller should use RegCloseKey to close the returned key. See the documentation for the Win32 function of the same name for additional information.

ERROR_KEY_DELETED

ERROR_BADKEY

ERROR_FILE_NOT_FOUND

ERROR_OUTOFMEMORY

ERROR_REGISTRY_IO_FAILED

ERROR_REGISTRY_CORRUPT

ERROR_BADDB


hkey

Handle of an open key or one of the predefined keys:

HKEY_CLASSES_ROOT

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_USERS

HKEY_CURRENT_CONFIG

HKEY_DYN_DATA


lpszSubKey

Address of a null-terminated string containing the name of the key to open.

phkResult

Address of variable that receives handle of opened key.

The key opened by this service is a subkey of the key which hkey identifies.

If lpszSubKey is NULL or a pointer to an empty string, the service returns hkey.

Of the predefined key values, only HKEY_LOCAL_MACHINE and HKEY_DYN_DATA are available to VxDs during initialization time. The entire registry space can only be accessed after VxD initialization is complete.

See also _RegCloseKey