What does Windows error code 1012 (ERROR_CANTREAD) mean?

 
Previous Next
ERROR_CANTOPEN ERROR_CANTWRITE

ERROR_CANTREAD

Registry configuration data could not be read

This status is narrower than a failed key open. The operation has reached a registry key context but cannot read the required configuration data. Typical registry reads query a value type and size before retrieving the value into a caller-supplied buffer.

Capture the exact value name, expected type, and read API. When using RegQueryValueEx, verify buffer-size handling and do not assume that string data returned by the API is always null-terminated. Also check access rights on the opened key and whether the key or hive is concurrently being replaced, unloaded, or damaged. If multiple unrelated values in the same hive fail, move the investigation from one application setting to the hive and storage layer; if one value fails consistently, compare its type and content with the producer that writes it.

What to inspect

  • Log the value name, type, buffer size, and result of the size-query call.
  • Verify the key was opened with the read rights required by the API.
  • Compare isolated value failure with broader failures in the same hive.

References


Looking for a different code? Search another status or error code.