IMFAttributes Interface

Provides a generic way to store key/value pairs on an object. The keys are GUIDs, and the values can be any of the following data types: UINT32, UINT64, double, GUID, wide-character string, byte array, or IUnknown pointer. The standard implementation of this interface holds a thread lock while values are added, deleted, or retrieved.

For a list of predefined attribute GUIDs, see Media Foundation Attributes. Each attribute GUID has an expected data type. The various "set" methods in IMFAttributes do not validate the type against the attribute GUID. It is the application's responsibility to set the correct type for the attribute.

To create an empty attribute store, call MFCreateAttributes.

Mitglieder

IMFAttributesSchnittstelle erbt von der IUnknown-Schnittstelle. IMFAttributes umfasst auch die folgenden Typen von Mitgliedern:

  • Methoden

Methoden

IMFAttributesSchnittstelle umfasst die folgenden Methoden.

Methode Beschreibung
Compare

Compares the attributes on this object with the attributes on another object.

CompareItem

Queries whether a stored attribute value equals a specified PROPVARIANT.

CopyAllItems

Copies all of the attributes from this object into another attribute store.

DeleteAllItems

Removes all key/value pairs from the object's attribute list.

DeleteItem

Removes a key/value pair from the object's attribute list.

GetAllocatedBlob

Retrieves a byte array associated with a key. This method allocates the memory for the array.

GetAllocatedString

Retrieves a wide-character string associated with a key. This method allocates the memory for the string.

GetBlob

Retrieves a byte array associated with a key.

GetBlobSize

Retrieves the length of a byte array associated with a key.

GetCount

Retrieves the number of attributes that are set on this object.

GetDouble

Retrieves a double value associated with a key.

GetGUID

Retrieves a GUID value associated with a key.

GetItem

Retrieves the value associated with a key.

GetItemByIndex

Retrieves an attribute at the specified index.

GetItemType

Retrieves the data type of the value associated with a key.

GetString

Retrieves a wide-character string associated with a key.

GetStringLength

Retrieves the length of a string value associated with a key.

GetUINT32

Retrieves a UINT32 value associated with a key.

GetUINT64

Retrieves a UINT64 value associated with a key.

GetUnknown

Retrieves an interface pointer associated with a key.

LockStore

Locks the attribute store so that no other thread can access it.

SetBlob

Associates a byte array with a key.

SetDouble

Associates a double value with a key.

SetGUID

Associates a GUID value with a key.

SetItem

Associates an attribute value with a key.

SetString

Associates a wide-character string with a key.

SetUINT32

Associates a UINT32 value with a key.

SetUINT64

Associates a UINT64 value with a key.

SetUnknown

Associates an IUnknown pointer with a key.

UnlockStore

Unlocks the attribute store.

 

Hinweise

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP mit Service Pack 2 (SP2) und höher.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (Oktober 2006 Updaterollup für Windows XP Media Center Edition) installed.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfobjects.h (include Mfidl.h)

Bibliothek

Mfuuid.lib

Siehe auch

Media Foundation Interfaces

Attributes and Properties