| Previous | Next |
| IMAPI_E_IMAGE_TOO_BIG | IMAPI_E_DATA_STREAM_READ_FAILURE |
IMAPI_E_DATA_STREAM_INCONSISTENCY
IMAPI_E_DATA_STREAM_INCONSISTENCY reports a mismatch between the size IMAPI2FS expected for a file stream and the number of bytes actually available. The HRESULT is documented for named-stream and other image-add paths that consume IStream data. It commonly indicates that the stream is mutable, reports an unstable size, or does not implement seek/read behavior consistently.
Treat the source IStream as the primary evidence
- Record the expected and observed byte counts reported with the error.
- Verify
IStream::Stat, seek position, and read behavior before passing the stream to IMAPI. - Prevent the underlying file or producer from changing while the image builder is reading or staging it.
A second read of a live or generated stream can produce different data even though the image path is unchanged. If the stream is custom, test it independently with repeated seek/read cycles and end-of-stream handling. Staging may change when the content is consumed, but it does not make a logically inconsistent stream correct. Freeze the source or provide an immutable stream whose size and readable byte count agree.
IFsiFileItem2::AddStream · Add · StageFiles
Looking for a different code? Search another status or error code.