Windows Media Player 11 SDK IWMPCore3::newPlaylist 

Windows Media Player SDK banner art

Previous Next

IWMPCore3::newPlaylist

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

Syntax

  

Parameters

bstrName

[in]  BSTR containing the playlist name.

bstrURL

[in]  BSTR containing the playlist URL.

ppPlaylist

[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.

Remarks

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.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next