WMEncoder.Attributes

Windows Media Encoder SDK banner art

The Attributes property retrieves a collection of user-defined name-value pairs.

Syntax

IWMEncAttributes = WMEncoder.Attributes

Parameters

This property takes no parameters.

Property Value

An IWMEncAttributes object containing a collection of attributes.

Remarks

Attributes are name-value pairs representing extra information about the output of the encoding session. They are defined by the author and stored in an attributes collection. Both the name and the value are String types.

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

' 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