Windows Media Player 11 SDK IWMPPlaylistCollection::newPlaylist 

Windows Media Player SDK banner art

Previous Next

IWMPPlaylistCollection::newPlaylist

The newPlaylist method creates a new, empty playlist in the library.

Syntax

  

Parameters

bstrName

[in]  String containing the name of the new playlist.

ppItem

[out]  Pointer to a pointer to an IWMPPlaylist interface for the new playlist.

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

This method creates an empty playlist in the library. To fill the playlist with media items, use IWMPPlaylist::appendItem or IWMPPlaylist::insertItem.

Multiple playlists having the same name are permitted in the library. To avoid creating a duplicate playlist name with this method, use the getByName method and IWMPPlaylistArray::count to determine whether a playlist with a particular name already exists.

Leading and trailing spaces are not permitted in playlist names, and are automatically removed from the value specified for the bstrName parameter.

Before calling this method, you must have full access to the library. For more information, see Library Access.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next