| Previous | Next |
| E_IMAPI_DF2DATA_WRITE_NOT_IN_PROGRESS | E_IMAPI_DF2DATA_STREAM_NOT_SUPPORTED |
E_IMAPI_DF2DATA_INVALID_MEDIA_STATE
E_IMAPI_DF2DATA_INVALID_MEDIA_STATE indicates that the media currently in the selected recorder is not in a state accepted by the requested IDiscFormat2Data operation. The interface exposes CurrentMediaStatus as a bitmask of IMAPI_FORMAT2_DATA_MEDIA_STATE values specifically for diagnosing this state.
Log the complete media-state bitmask before retrying
- Read
CurrentMediaStatusand retain all flags rather than mapping them to a single “ready/not ready” Boolean. - Record physical media type, write-protect status and whether overwrite or append behavior was requested.
- Re-evaluate state after media-change notifications; do not reuse a cached result after eject or replacement.
The error is broader than “disc not blank.” Non-blank overwrite policy has its own E_IMAPI_DF2DATA_MEDIA_NOT_BLANK code. Here the useful evidence is the state mask exposed by the same format object. Resolve the specific incompatible state—such as finalization or write protection—before calling the operation again; repeatedly invoking Write cannot transition the medium into a supported state by itself.
CurrentMediaStatus · IDiscFormat2Data · Checking media support
Looking for a different code? Search another status or error code.