Export (0) Print
Expand All

IPropertyBag2::GetPropertyInfo Method

Gets information for properties in a property bag without actually getting those properties.


HRESULT GetPropertyInfo(
    ULONG iProperty,
    ULONG cProperties,
    PROPBAG2 *pPropBag,
    ULONG *pcProperties


[in] The zero-based index of the first property for which information is requested. This argument must be less than the number of properties retrieved by IPropertyBag2::CountProperties.
[in] The number of properties to get information for. This argument specifies the number of array elements in pPropBag.
[out] The address of an array of PROPBAG2 structures that receive the information for the properties. There must be at least cProperties elements in this array. This argument cannot be NULL.
[out] The address of a unsigned long that receives the number of properties for which information was retrieved. This argument cannot be NULL.

Return Value

Returns one of the following values.

S_OK Information was successfully retrieved for all of the requested properties.
E_INVALIDARG iProperty is greater than the number of properties in the property bag.
E_OUTOFMEMORY A memory allocation error occurred.


When you implement this method, use CoTaskMemAlloc to allocate memory for the pstrName member of pPropBag.

When you call this method, use CoTaskMemFree to free the pstrName member of pPropBag.

See Also

Community Additions

© 2015 Microsoft