MPLATFORMLib Namespace > MLiveClass Class : PropsGetCount Method |
Public Overridable Sub PropsGetCount( _ ByVal _bsNodeName As String, _ ByRef _pnCount As Integer _ )
public virtual void PropsGetCount( string _bsNodeName, out int _pnCount )
public procedure PropsGetCount( _bsNodeName: String; Out _pnCount: Integer ); virtual;
public: virtual void PropsGetCount( BSTR* _bsNodeName, [PARAMFLAG::Out] int _pnCount )
Here is example of how to remove all playlist item properties:
Dim myPlaylist As New MPlaylistClass() myPlaylist.ObjectStart(New Object()) Dim myIndex As Integer = -1 Dim myItem As MItem myPlaylist.PlaylistAdd(Nothing, "c:\mySourceFile.mp4", "", myIndex, myItem) myPlaylist.FilePlayStart() Dim nCount As Integer DirectCast(myItem, IMProps).PropsGetCount("info", nCount) For i As Integer = 0 To nCount - 1 Dim myName As String Dim myValue As String Dim myNode As Integer DirectCast(myItem, IMProps).PropsGetByIndex("info", i, myName, myValue, myNode) DirectCast(myItem, IMProps).PropsRemove(myName) Next
MPlaylistClass myPlaylist = new MPlaylistClass(); myPlaylist.ObjectStart(new object()); int myIndex = -1; MItem myItem; myPlaylist.PlaylistAdd(null, @"c:\mySourceFile.mp4", "", ref myIndex, out myItem); myPlaylist.FilePlayStart(); int nCount; ((IMProps)myItem).PropsGetCount("info", out nCount); for (int i=0; i<nCount; i++) { string myName; string myValue; int myNode; ((IMProps)myItem).PropsGetByIndex("info", i, out myName, out myValue, out myNode); ((IMProps)myItem).PropsRemove(myName); }
var myPlaylist: IMPlaylist; myIndex: integer; myItem: MItem; myFile: IMFile; myValue, myName: widestring; myProps: IMProps; myCount, i, myNode: integer; begin //configure playlist myPlaylist:= CreateComObject(CLASS_MPlaylist) as IMPlaylist; myFile:= myPlaylist as IMFile; myIndex:=-1; myPlaylist.PlaylistAdd(nil, 'c:\mySourceFile.mp4', '', myIndex, myItem); myFile.FilePlayStart(); myProps:= myItem as IMProps; myProps.PropsGetCount('info', out myCount); for i:=0 to nCount-1 do begin myProps.PropsGetByIndex('info', i, myName, myValue, myNode); myProps.PropsRemove(myName); end; end;