Share via


IWMEncAttributes.RemoveAll

Windows Media Encoder SDK banner art

The RemoveAll method removes all attributes from the collection of user-defined attributes.

Syntax

IWMEncAttributes.RemoveAll

Parameters

This method takes no parameters.

Return Values

If this method fails, it returns an error number.

Return code Description
0xC00D1B66 You cannot call this method if the encoder engine is running.

Remarks

Use the IWMEncAttributes.Remove method to remove a single attribute from the collection. Use the IWMEncAttributes.Add method to add an attribute to 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