PSPropertyBag_ReadStream function

Reads the data stream stored in a given property contained in a specified property bag.

Syntax


HRESULT PSPropertyBag_ReadStream(
  _In_   IPropertyBag *propBag,
  _In_   LPCWSTR propName,
  _Out_  IStream **value
);

Parameters

propBag [in]

Type: IPropertyBag*

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

propName [in]

Type: LPCWSTR

A pointer to a null-terminated property name string.

value [out]

Type: IStream**

The address of a pointer that, when this function returns successfully, receives the IStream object.

Return value

Type: HRESULT

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

Remarks

The caller of the PSPropertyBag_ReadStream function needs to call a IUnknown::Release method on the IStream object returned by this function.

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Propsys.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

See also

PSPropertyBag_WriteStream

 

 

Community Additions

ADD
Show:
© 2015 Microsoft