Skip to content

Latest commit

 

History

History
135 lines (89 loc) · 5.71 KB

nf-coml2api-stgcreatepropstg.md

File metadata and controls

135 lines (89 loc) · 5.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:coml2api.StgCreatePropStg
StgCreatePropStg function (coml2api.h)
Creates and opens a property set in a specified storage or stream object.
StgCreatePropStg
StgCreatePropStg function [Structured Storage]
_stg_stgcreatepropstg
coml2api/StgCreatePropStg
stg.stgcreatepropstg
stg\stgcreatepropstg.htm
Stg
fc171888-3723-4894-a356-1b234352c4e8
12/05/2018
StgCreatePropStg, StgCreatePropStg function [Structured Storage], _stg_stgcreatepropstg, coml2api/StgCreatePropStg, stg.stgcreatepropstg
coml2api.h
Propidl.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Ole32.lib
Ole32.dll
Windows
19H1
StgCreatePropStg
coml2api/StgCreatePropStg
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l2-1-1.dll
coml2.dll
StgCreatePropStg

StgCreatePropStg function

-description

The StgCreatePropStg function creates and opens a property set in a specified storage or stream object. The property set supplies the system-provided, stand-alone implementation of the IPropertyStorage interface.

-parameters

-param pUnk [in]

A pointer to the IUnknown interface on the storage or stream object that stores the new property set.

-param fmtid [in]

The FMTID of the property set to be created.

-param pclsid [in]

A Pointer to the initial CLSID for this property set. May be NULL, in which case pclsid is set to all zeroes.

-param grfFlags [in]

The values from PROPSETFLAG Constants that determine how the property set is created and opened.

-param dwReserved [in]

Reserved; must be zero.

-param ppPropStg [out]

The address of an IPropertyStorage* pointer variable that receives the interface pointer to the new property set.

-returns

This function supports the standard return values E_INVALIDARG and E_UNEXPECTED, in addition to the following:

-remarks

StgCreatePropStg creates and opens a new property set which supplies the system-provided, stand-alone 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. For more information about using this PROPSETFLAG_UNBUFFERED enumeration value, see PROPSETFLAG Constants.

The property set automatically contains code page and locale identifier (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 PROPSETFLAG Constants. The new enumeration value PROPSETFLAG_UNBUFFERED is supported. For more information, see PROPSETFLAG Constants.

This function is exported out of the redistributable Iprop.dll, which is included in Windows NT 4.0 with Service Pack 2 (SP2) and later and available as a redistributable in Windows 95, Windows 98 and later. In Windows 2000 and Windows XP, it is exported out of ole32.dll. It can also be exported out of iprop.dll in Windows 2000 and Windows XP, but the call gets forwarded to ole32.dll.

-see-also

IPropertySetStorage

IPropertySetStorage-Stand-alone Implementation

IPropertyStorage

IPropertyStorage-Stand-alone Implementation

PROPSETFLAG Constants

StgCreatePropSetStg

StgOpenPropStg