Constants

This section describes the constants used with the registry services.

Predefined Keys

HKEY_LOCAL_MACHINE

Contains information about the hardware and software on the computer.

HKEY_USERS

Contains information about the users of the computer. In particular, this contains any user-specific information associated with hardware or software is stored.

HKEY_CURRENT_USER

Contains information about the current user. This is mapped to the default user branch under the HKEY_USERS key.

HKEY_CURRENT_CONFIG

Contains information about the hardware configuration of the computer. This typically

HKEY_CLASSES_ROOT

Contains information about OLE classes.

HKEY_PERFORMANCE_DATA

Contains information about system performance.

HKEY_DYN_DATA

Contains information about dynamic data.


Registry Value Types

REG_SZ

Null-terminated string

REG_BINARY

Binary data consisting of a specified number of bytes.

All other types

Valid, but treated as binary internally.


Error Values

ERROR_SUCCESS

Completed successfully.

ERROR_CANNOT_OPEN_REGFILE

Cannot find the required registry hive file or possibly the file is kept open by another application.

ERROR_INSUFFICIENT_MEMORY

Not enough memory to open this registry key or not enough memory to load the required data from the registry file, or the given buffer is not enough to hold the data.

ERROR_INVALID_PARAMETER

lpszDevName is an invalid address, or dwFlags is incorrect.

ERROR_REGFILE_READERROR

Error reading the registry file. Possibly, the file is corrupt.

ERROR_REGFILE_WRITEERROR

Error writing the registry file. Possibly, the file is corrupt.

ERROR_REGKEY_INVALIDKEY

The lpszSubKey string contains an invalid character or the given hKey is invalid.

ERROR_FILE_NOT_FOUND

No more subkeys, or the key specified is not found in the registry database.

ERROR_VALUE_NOT_FOUND

No more values to enumerate, or the given value name is not present for the given registry key.