PSPropertyBag_ReadUnknown function (propsys.h)

Reads a given property of an unknown data value in a property bag.

Syntax

PSSTDAPI PSPropertyBag_ReadUnknown(
  [in]  IPropertyBag *propBag,
  [in]  LPCWSTR      propName,
  [in]  REFIID       riid,
  [out] void         **ppv
);

Parameters

[in] propBag

Type: IPropertyBag*

A pointer to an IPropertyBag object, that represents the property bag in which the property is stored.

[in] propName

Type: LPCWSTR

A pointer to a null-terminated property name string.

[in] riid

Type: REFIID

A reference to the IID of the interface to retrieve through ppv. This interface IID should be IPropertyBag or an interface derived from IPropertyBag.

[out] ppv

Type: void**

When this method returns successfully, contains the interface pointer requested in riid. This is typically riid.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IPropertyBag and IPersistPropertyBag optimize Save As Text functionality. IPropertyBag and IPropertyBag2 provide an object with a property bag in which the object can save its properties persistently. IPropertyBag2 allows the object to obtain type information for each property: IPropertyBag2::Read causes one or more properties to be read from the property bag, and IPropertyBag2::Write causes one or more properties to be saved into the property bag.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header propsys.h
Library Propsys.lib
DLL Propsys.dll (version 6.0 or later)

See also

PSPropertyBag_WriteUnknown