IWMEncAttributes.Count
The Count property retrieves the number of name-value pairs in the collection of user-defined attributes.
Syntax
Long = IWMEncAttributes.Count
Parameters
This property takes no parameters.
Property Value
A Long containing the number of attributes in the collection.
Remarks
Call Count before iterating through the collection, and use the returned value as an upper loop boundary.
Example Code
' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder
' Retrieve an IWMEncAttributes object.
Dim Attr As IWMEncAttributes
Set Attr = Encoder.Attributes
Dim i As Integer
Dim sName As String
Dim sValue As String
' Add three custom attributes to the collection.
Attr.Add "Date created: ", "02/15/2000"
Attr.Add "Time created: ", "13:30:15"
Attr.Add "File content: ", "multimedia data"
' View the attributes in the collection.
For i = 0 To Attr.Count - 1
sValue = Attr.Item(i, sName)
Next i
' Remove an attribute by name.
Attr.Remove ("File content: ")
' Remove an attribute by index.
Attr.Remove (0)
' Remove any remaining attributes.
Attr.RemoveAll
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also