Opens a property set contained in the property set storage object.
HRESULT Open(
REFFMTID fmtid, //The format identifier of the property set to
//be opened
DWORD grfMode, //Storage mode in which property set is to be
//opened
IPropertyStorage** ppPropStg
//Address of output variable that receives the
//IPropertyStorage interface pointer
);
This method supports the standard return value E_UNEXPECTED, as well as the following:
The mode in which the property set is to be opened is specified in the parameter grfMode. These flags are taken from the STGM enumeration, but, for this method, legal values and their meanings are as follows (only certain combinations of these flag values are legal).
Value | Meaning |
---|---|
STGM_DIRECT | Open the property set without an additional level of transaction nesting. This is the default (the behavior if neither STGM_DIRECT nor STGM_TRANSACTED is specified). |
STGM_TRANSACTED | Open the property set with an additional level of transaction nesting (beyond the transaction, if any, on this property set storage object). Transacted mode is available only on non-simple property sets, because they use an IStorage with a contents stream. Changes in the property set must be committed with a call to IPropertyStorage::Commit before they are visible to the transaction on this property set storage. |
STGM_READ | Open the property set with read access. Read permission is required on the property set storage. |
STGM_WRITE | Open the property set with write access. Write permission is not required on the IPropertySetStorage; however, such write permission is required for changes in the storage to be committed. |
STGM_READWRITE | Open the property set with read-write access. Note that this flag is not the binary OR of the values STGM_READ and STGM_WRITE. |
STGM_SHARE_DENY_NONE | Subsequent openings of the property set are not denied read or write access. Not available in compound file implementation. |
STGM_SHARE_DENY_READ | Subsequent openings of the property set in are denied read access. Not available in compound file implementation. |
STGM_SHARE_DENY_WRITE | Subsequent openings of the property set are denied write access. This value is typically used to prevent making unnecessary copies of an object opened by multiple users. If this value is not specified, a snapshot is made, whether there are subsequent openings or not. Thus, you can improve performance by specifying this value. Not available in compound file implementation. |
STGM_SHARE_EXCLUSIVE | The combination of STGM_SHARE_DENY_READ and STGM_SHARE_DENY_WRITE. |
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in objidl.h.