Stores up to 32 bits of state information in this storage object.

HRESULT SetStateBits(

DWORD grfStateBits,
//Specifies new values of bits
DWORD grfMask
//Specifies mask that indicates which bits are significant



[in]Specifies the new values of the bits to set. No legal values are defined for these bits; they are all reserved for future use and must not be used by applications. See the STGSTATE enumeration for a definition of these values.


[in]A binary mask indicating which bits in grfStateBits are significant in this call. See the STGSTATE enumeration for a definition of these values.

Return Values


The state information was successfully set.


The caller does not have sufficient permissions for changing this storage object.


The value for the grfStateBits or grfMask parameters are not valid.


One of the parameters was invalid.


You can retrieve the state information with the IStorage::Stat method. When a storage object is first created, the value of this state information is zero. The values for the state bits are not defined currently and should not be used by applications.

The state set by this method is for external use only. The OLE-provided compound file implementation does not perform any action based on the state.

See Also

STATSTATE, IStorage::Stat

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database