Windows Media Player 11 SDK IWMPMediaCollection::addÂ
Previous | Next |
IWMPMediaCollection::add
The add method adds a new media item or playlist to the library.
Syntax
Parameters
bstrURL
[in] String containing the URL that specifies the location of the media item or playlist.
ppItem
[out] Pointer to a pointer to the IWMPMedia interface for the added item or 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 loads an existing media item or playlist into the library, given a path. This method does not move or change the file. This method fails if given an invalid local path, but media items themselves are not checked for validity before they are added to the library.
This method accepts both static and auto playlist files. The IWMPPlaylistCollection::importPlaylist method can also be used to add a static playlist to the library.
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 |