DirectShow Animated Header -- IMediaPropertyBag Interface DirectShow Animated Header -- IMediaPropertyBag Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IMediaPosition Interface
*Next Topic: IMediaSample Interface

IMediaPropertyBag Interface


The IMediaPropertyBag interface is an interface that is exposed on filters that need to record copyright information. The interface inherits from the IPropertyBag interface and supports its Read and Write methods for properties. It includes one additional method, EnumProperty, which retrieves or sets a property and value pair.

You can find more information on the IMediaPropertyBag interface in the COM documentation of the Platform SDK.

When to Implement

Implement this interface when you need to expose copyright information on filters

When to Use

Applications should use this interface when they need to copyright the stream name of a multimedia file.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IMediaPropertyBag methods Description
EnumProperty Retrieves or sets a property and value pair.


IMediaPropertyBag::EnumProperty

IMediaPropertyBag Interface

Retrieves or sets a property and value pair.

HRESULT EnumProperty(
  ULONG iProperty,
  VARIANT * pvarPropertyName,
  VARIANT * pvarPropertyValue );

Parameters
iProperty
[in] Index value of the pair to get or set.
pvarPropertyName
[in, out] Property's name.
pvarPropertyValue
[in, out] Property's value.
Return Values

This method returns HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS) if the iProperty parameter is larger than the number of properties there are (iProperty is zero-based). Otherwise, it will return an HRESULT value that depends on the implementation of the interface.

Remarks

The pvarPropertyName parameter is always a string; the caller should set the variant type to VT_EMPTY or VT_BSTR before calling this function. The pvarPropertyValue parameter can be any variant; the caller should set the variant type to VT_EMPTY or what is expected.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page