Opens a specified property set in a specified storage or stream object. The property set supplies the system-provided, standalone implementation of the IPropertyStorage interface.
HRESULT StgOpenPropStg(
IUnknown* pUnk, //Interface pointer for object containing the
// requested property set
REFFMTID fmtid, //Format identifier of the property set to be
// opened
DWORD grfFlags, //PROPSETFLAG values
DWORD dwReserved, //Reserved; must be zero
IPropertyStorage** ppPropStg
//Address of output variable that receives the
// IPropertyStorage interface pointer
);
This function supports the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following:
StgOpenPropStg opens the requested property set and supplies the system-provided, standalone implementation of the IPropertyStorage interface. The requested property set is contained in the storage or stream object specified by pUnk. The value of the grfFlags parameter indicates whether pUnk specifies a storage or stream object. For example, if PROPSETFLAG_NONSIMPLE is set, then pUnk can be queried for an IStorage interface on a storage object.
In either case, this function calls pUnk->AddRef for the storage or stream object containing the property set. It is the responsibility of the caller to release the object when it is no longer needed.
This function is similar to the IPropertySetStorage::Open method. However, StgOpenPropStg adds the pUnk and grfFlags parameters, including the PROPSETFLAG_UNBUFFERED value for the grfFlags parameter. Use this function instead of the Open method if you have an IStorage interface that does not support the IPropertySetStorage interface, or if you want to use the PROPSETFLAG_UNBUFFERED value. See the PROPSETFLAG enumeration for more information on using PROPSETFLAG_UNBUFFERED.
The grfFlags parameter is a combination of values taken from the enumeration PROPSETFLAG. The new enumeration value PROPSETFLAG_UNBUFFERED is supported. See the PROPSETFLAG enumeration for more information on the use of this value.
Windows NT | 4.0/SP2 or with IPROP.DLL |
Win95 | Yes; requires IPROP.DLL |
Win32s | No |
Unicode | Yes |
Import Library | IPROP.DLL |
Header File | IPROPIDL.H |
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in objidl.h.
Import Library: Included as a resource in ole32.dll.
IPropertySetStorage, IPropertySetStorage-Standalone Implementation, IPropertyStorage, IPropertyStorage-Standalone Implementation, PROPSETFLAG, StgCreatePropStg, StgCreatePropSetStg