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.