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.

Further documentation on the IMediaPropertyBag interface can be found in the COM documentation of the Platform SDK.

When to Implement

Implement this interface on filters that wish to expose copy right information.

When to Use

Applications use this interface 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. PropertyValue can be any variant; the caller should set the variant type to VT_EMPTY or what is expected.

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