SHPropStgCreate function (shlobj_core.h)
[This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.]
Ensures proper handling of code page retrieval or assignment for the requested property set operation.
Syntax
SHSTDAPI SHPropStgCreate(
[in] IPropertySetStorage *psstg,
[in] REFFMTID fmtid,
[in, optional] const CLSID *pclsid,
DWORD grfFlags,
DWORD grfMode,
DWORD dwDisposition,
[out] IPropertyStorage **ppstg,
[out, optional] UINT *puCodePage
);
Parameters
[in] psstg
Type: IPropertySetStorage*
A pointer to an IPropertySetStorage interface.
[in] fmtid
Type: REFFMTID
A property set ID to open. The values for this parameter can be either one of those defined in Predefined Property Set Format Identifiers or any other FMTID that you register.
[in, optional] pclsid
Type: const CLSID*
A pointer to the CLSID associated with the set. This parameter can be NULL.
grfFlags
Type: DWORD
One or more members of the PROPSETFLAG enumeration that determine how the property set is created and opened. All sets containing ANSI bytes should be created with PROPSETFLAG_ANSI, otherwise PROPSETFLAG_DEFAULT.
grfMode
Type: DWORD
The flags from the STGM enumeration that indicate conditions for creating and deleting the object and access modes for the object. Must contain STGM_DIRECT | STGM_SHARE_EXCLUSIVE.
dwDisposition
Type: DWORD
One of the following values, defined in Fileapi.h.
CREATE_NEW (1)
Create a new set if one does not already exist.
CREATE_ALWAYS (2)
Always create a new set, overwriting any existing set.
OPEN_EXISTING (3)
Open the existing set.
OPEN_ALWAYS (4)
[out] ppstg
Type: IPropertyStorage**
When this method returns, contains an IPropertyStorage interface pointer.
[out, optional] puCodePage
Type: UINT*
When this method returns, contains the address of the code page ID for the set.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlobj_core.h |
Library | Shell32.lib |
DLL | Shell32.dll (version 6.0 or later) |