Windows Media Player 11 SDK IWMPPlaylist.appendItem (VB and C#)
Previous | Next |
IWMPPlaylist.appendItem (VB and C#)
The appendItem method adds a media item to the end of a playlist.
Parameters
pIWMPMedia
An WMPLib.IWMPMedia interface that represents the media item to be appended.
Remarks
Before calling this method, you must have full access to the library. For more information, see Library Access.
Example Code
The following example uses appendItem to add the current media item to the playlist named "ThreeList". The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
' Get an interface to the current media item. Dim currMedia As WMPLib.IWMPMedia = player.currentMedia ' Get an interface to the playlist named "ThreeList". Dim plThreeList As WMPLib.IWMPPlaylist = player.playlistCollection.getByName("ThreeList").Item(0) ' Append the media item to the playlist. plThreeList.appendItem(currMedia)
FakePre-9a98e03edc7b4a7ead113a5d172879a2-8a613e5f53314c63b13475f218c743a7
// Get an interface to the current media item. WMPLib.IWMPMedia currMedia = player.currentMedia; // Get an interface to the playlist named "ThreeList". WMPLib.IWMPPlaylist plThreeList = player.playlistCollection.getByName("ThreeList").Item(0); // Append the media item to the playlist. plThreeList.appendItem(currMedia);
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
Previous | Next |