IPropertyContainer Class

class IPropertyContainer: public IQueryGuid, public IRefCount

This interface provides access to an object's properties. Objects that support properties implement this interface. This interfaces provides functions for retrieving the description or metadata of properties supported by an object. The description of a property is accessed through the  IProperty interface. The  GetProperty,  GetPropertyAt, and  GetPropertyByName functions return an  IProperty pointer for a given property.

Property containers also provide access to the values of properties. Property values are returned as VARIANTs by the the  GetPropertyValue function. Property values are set using the  PutPropertyValue function. There are also methods for getting and putting a properties value as a string.

Defined in: PropIface.h

Class Members

virtual int  GetPropertyCount() const

Get the number of properties in the container.

virtual IProperty*  GetPropertyAt(const int nPropIdx) const

Get the property using an index into the container.

virtual IProperty*  GetProperty(const PropertyId propId) const

Retrieve a property by unique identifier.

virtual IProperty*  GetPropertyByName(OLECHAR* propName) const

Retrieve a property by name.

virtual bool  GetCategoryName(const int nCatId, BSTR& catName) const

Return the string name of a property category.

virtual bool  GetPropertyValue(const PropertyId propId, VARIANT& propVal) const

Get a property value using the property ID.

virtual bool  GetPropertyContainer(const PropertyId propId, IPropertyContainer** container) const

Retrieve a pointer to a nested property container.

virtual bool  GetPropertyString(const PropertyId propId, BSTR& propVal) const

Get a property value as a string using the property ID.

virtual bool  PutPropertyValue(const PropertyId propId, const VARIANT& propVal)

Set a property value using the property ID.

virtual bool  PutPropertyString(const PropertyId propId, const BSTR& propVal)

Set a property value as string using the property ID.