Creates and opens a property set in a specified storage or stream object. The property set supplies the system-provided, standalone implementation of the IPropertyStorage interface.
HRESULT StgCreatePropStg(
IUnknown* pUnk, //Interface pointer for object containing
// the new property set
REFFMTID fmtid, //Format identifier of the property set to
// be created
const CLSID* pclsid, //Initial CLSID for the new property set
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:
StgCreatePropStg creates and opens a new property set which supplies the system-provided, standalone implementation of the IPropertyStorage interface. The new 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::Create method. However, StgCreatePropStg adds the pUnk parameter and supports the PROPSETFLAG_UNBUFFERED value for the grfFlags parameter. Use this function instead of the Create 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 this PROPSETFLAG_UNBUFFERED.
The property set automatically contains code page and locale ID properties. These are set to the current system default and the current user default, respectively.
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, StgOpenPropStg, StgCreatePropSetStg