Windows Media Player 11 SDK IWMPCore3::newPlaylist 

Windows Media Player SDK banner art

Previous Next


The newPlaylist method retrieves a pointer to an IWMPPlaylist interface for a new playlist.





[in]  BSTR containing the playlist name.


[in]  BSTR containing the playlist URL.


[out]  Pointer to a pointer to an IWMPPlaylist interface.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.


If the bstrURL parameter is a null or empty string, this method creates an empty Playlist object. If the bstrname parameter is an empty string, this method applies the current metafile name.

The new playlist created with this method is not added to the library. To add a new playlist to the library, use IWMPPlaylistCollection::importPlaylist or IWMPPlaylistCollection::newPlaylist. Any leading or trailing spaces in the playlist name are automatically removed when it is added to the library.

Because the library allows multiple playlists with the same name, you may want to check for the presence of a playlist with a given name before adding a new one.


Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next