IPropertyBag2::GetPropertyInfo Method

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

Syntax


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

Parameters

iProperty
[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.
cProperties
[in] The number of properties to get information for. This argument specifies the number of array elements in pPropBag.
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.
pcProperties
[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.

Remarks

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

ADD
Show:
© 2014 Microsoft