PlaylistCommandAdd Method (IMPlaylist)
name of the comand
parameters of the command
target object of the command
index of output item
output playlist MItem object
Adds a command to the playlist.
Syntax
Sub PlaylistCommandAdd( _
   ByVal _bsCommand As String, _
   ByVal _bsParam As String, _
   ByVal _pTargetObject As Object, _
   ByRef _pnIndex As Integer, _
   ByRef _ppPlaylistItem As MItem _
) 
void PlaylistCommandAdd( 
   string _bsCommand,
   string _bsParam,
   object _pTargetObject,
   out int _pnIndex,
   out MItem _ppPlaylistItem
)
procedure PlaylistCommandAdd( 
    _bsCommand: String;
    _bsParam: String;
    _pTargetObject: TObject;
   Out  _pnIndex: Integer;
   Out  _ppPlaylistItem: MItem
); 
void PlaylistCommandAdd( 
   BSTR* _bsCommand,
   BSTR* _bsParam,
   IUnknown* _pTargetObject,
   [PARAMFLAG::Out] int _pnIndex,
   [PARAMFLAG::Out] MItem* _ppPlaylistItem
) 

Parameters

_bsCommand
name of the comand
_bsParam
parameters of the command
_pTargetObject
target object of the command
_pnIndex
index of output item
_ppPlaylistItem
output playlist MItem object
Example

Here is example of how to add command to the playlist:

Dim myIndex As Integer = -1
Dim myItem As MItem
Dim strPath As String
Dim dblPos As Double
myPlaylist.PlaylistGetByIndex(1, dblPos, strPath, myItem)
Dim myTargetItem As MItem
myPlaylist.PlaylistCommandAdd("mute", "true", myItem, myIndex, myTargetItem)
myTargetItem.ItemCommandExecute(myPlaylist)
int myIndex = -1;
MItem myItem;
string strPath;
double dblPos;
myPlaylist.PlaylistGetByIndex(1, out dblPos, out strPath, out myItem);
MItem myTargetItem;
myPlaylist.PlaylistCommandAdd("mute", "true", myItem, ref myIndex, out myTargetItem);
myTargetItem.ItemCommandExecute(myPlaylist);
var
myIndex: integer;
myItem, myTargetItem: MItem;
strPath: widestring;
dblPos: double;
begin
myPlaylist.PlaylistGetByIndex(1, dblPos, strPath, myItem);
myPlaylist.PlaylistCommandAdd('mute', 'true', myItem, myIndex, myTargetItem);
myTargetItem.ItemCommandExecute(myPlaylist);
end;
See Also

Reference

IMPlaylist Interface
IMPlaylist Members