Handling Disc Ejections

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

When the user ejects a DVD from the drive, the DVD Navigator sends your application an EC_DVD_DISC_EJECTED message. The application can safely ignore this message and let the DVD Navigator manage the graph's state. An application can also handle the EC_DVD_DISC_EJECTED method to implement custom behavior when a disc is ejected. If you handle the message, you must set the DVD_ResetOnStop flag to TRUE with the SetOption method and then call IMediaControl::Stop before closing the application or playing another disc.

DVD Applications