Burning a CD

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

This section describes how to use the IWMPCdromBurn interface to burn music to a CD. The IWMPCdromBurn interface provides functionality for burning playlists to CDs as either data or audio tracks, as well as erasing CD-RWs.

Code Usage

The code examples in this section use Active Template Library (ATL) classes, such as CComPtr.

Included Headers

To use the code in this section, include the following headers:

#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <commctrl.h>
#include "wmp.h"
#include "wmpids.h"

Interface Pointers

The interfaces for Windows Media Player are stored in the following member variables:

// Player interface.
CComPtr<IWMPPlayer>             m_spPlayer;

// CDROM interfaces.
CComPtr<IWMPCdromCollection>    m_spCdromCollection;
CComPtr<IWMPCdrom>              m_spCdrom;
CComPtr<IWMPCdromBurn>          m_spCdromBurn;
CComPtr<IWMPPlaylist>           m_spPlaylist;

The following topics describe how to use the CD burning API.

Player Control Guide