| Previous | Next |
| ERROR_APPX_FILE_NOT_ENCRYPTED | ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET |
ERROR_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED
Raw encrypted I/O was used on an unencrypted file
ERROR_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED occurs when a caller uses the raw encrypted-file data path, but the target file does not have the encryption state required by that API. Ordinary file reads and writes are a different operation.
Common mistakes
- Backup or migration code assumes every file in an encrypted directory is encrypted.
- The file was decrypted or replaced between enumeration and transfer.
- The caller opened the wrong path or stream.
- Metadata was restored without restoring the corresponding encryption state.
Diagnosis
Query the file's actual attributes immediately before starting raw transfer. Record the volume, stream name, and whether the file changed since enumeration. Avoid relying on the parent directory's policy as proof of the file's current state.
Handling
Use ordinary file I/O for unencrypted files, or apply the documented encryption workflow before raw encrypted transfer when that is truly required. Do not reinterpret raw encrypted blocks as plaintext.
Backup design
A robust backup format should record encryption state per file and validate it again during restore. Mixed encrypted and unencrypted content must be expected.
References
Looking for a different code? Search another status or error code.