SHPropertyBag_ReadStream

This function asks a property bag to read a named property as an IStream interface.

Declaration

HRESULT
SHPropertyBag_ReadDWORD (
    IPropertyBag *ppb,
    LPCWSTR pszPropName,
    IStream **ppStream);

Parameters

The ppb argument provides the address of an IPropertyBag interface.

The pszPropName argument provides the address of a null-terminated Unicode string that names the property.

The ppStream argument provides the address of a variable that is to receive a pointer to the property value’s IStream interface.

Return Value

The function returns zero for success, else an error code.

Behaviour

If any of the ppb, pszPropName and ppStream arguments are NULL, the function fails, with E_INVALIDARG as the error code. If the function cannot read the named property as a VT_UNKNOWN type (using SHPropertyBag_ReadType), it fails. If the function cannot then get an IStream interface pointer from the IUnknown interface pointer, it fails.

Availability

The SHPropertyBag_ReadStream function is exported from SHLWAPI as ordinal 531 in version 6.00.

Though this function dates from 2001, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.