What does HRESULT 0xC0AA0502 (E_IMAPI_DF2TAO_MEDIA_IS_NOT_PREPARED) mean?

 
Previous Next
E_IMAPI_DF2TAO_WRITE_NOT_IN_PROGRESS E_IMAPI_DF2TAO_MEDIA_IS_PREPARED

E_IMAPI_DF2TAO_MEDIA_IS_NOT_PREPARED

E_IMAPI_DF2TAO_MEDIA_IS_NOT_PREPARED means the Track-at-Once session has not crossed the required PrepareMedia boundary. Microsoft explicitly requires put_Recorder and PrepareMedia before AddAudioTrack. Preparing the media locks it for exclusive access.

Enforce the documented session sequence

  • Set a supported recorder and a valid client name.
  • Call PrepareMedia and preserve its HRESULT before submitting any audio stream.
  • After the write or cancellation, call ReleaseMedia to close the session and release the lock.

Retrying AddAudioTrack without preparing the same format object will fail again. This is not an audio-format validation error: E_IMAPI_DF2TAO_STREAM_NOT_SUPPORTED covers invalid track data. Logging explicit session states—configured, prepared, writing and released—makes it straightforward to identify a missing prepare call or a call issued on a different COM object than the one that was prepared.

PrepareMedia · AddAudioTrack · ReleaseMedia


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