IWMEncAttributes.Remove
The Remove method removes a specific name-value pair from the collection.
Syntax
IWMEncAttributes.Remove(var)
Parameters
var
[in] Variant containing either the name or index of the attribute to be removed.
Return Values
If this method fails, it returns an error number.
Return code | Description |
0xC00D0011 | The input parameter does not match a valid index in the attributes collection. |
0xC00D1B66 | You cannot call this method if the encoder engine is running. |
Remarks
The attribute to be removed can be specified either by a string name or by an index into the attribute collection. Use the IWMEncAttributes.Add method to add an attribute to the collection. Use the IWMEncAttributes.RemoveAll method to delete all attributes from the collection.
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