PlaylistGetByIndex Method (MItemClass)
playlist item index (use -1 for the current item, -2 for the current break or qued item and -3 for qued item only in case of breaks)
file offset from the start
item path
playlist item MItem object
Gets the item and the item offset from the start by item index.
Syntax
Public Overridable Sub PlaylistGetByIndex( _
   ByVal _nIndex As Integer, _
   ByRef _pdblFileOffset As Double, _
   ByRef _pbsPath As String, _
   ByRef _ppPlaylistItem As MItem _
) 
public virtual void PlaylistGetByIndex( 
   int _nIndex,
   out double _pdblFileOffset,
   out string _pbsPath,
   out MItem _ppPlaylistItem
)
public procedure PlaylistGetByIndex( 
    _nIndex: Integer;
   Out  _pdblFileOffset: Double;
   Out  _pbsPath: String;
   Out  _ppPlaylistItem: MItem
); virtual; 
public: virtual void PlaylistGetByIndex( 
   int _nIndex,
   [PARAMFLAG::Out] double _pdblFileOffset,
   [PARAMFLAG::Out] BSTR* _pbsPath,
   [PARAMFLAG::Out] MItem* _ppPlaylistItem
) 

Parameters

_nIndex
playlist item index (use -1 for the current item, -2 for the current break or qued item and -3 for qued item only in case of breaks)
_pdblFileOffset
file offset from the start
_pbsPath
item path
_ppPlaylistItem
playlist item MItem object
Example

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

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)
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);
var
myIndex: integer;
myItem, myTargetItem: MItem;
strPath: widestring;
dblPos: double;
begin
myPlaylist.PlaylistGetByIndex(1, dblPos, strPath, myItem);
myPlaylist.PlaylistCommandAdd('mute', 'true', myItem, myIndex, myTargetItem);
end;
See Also

Reference

MItemClass Class
MItemClass Members