Home COM GDI+ WebBrowser Data Access

Structured Storage Enumerations

 

Enumerations and Constants

 

LOCKTYPE Enumeration

PROPSETFLAGS Constants

STATFLAG Enumeration

STGC Enumeration

STGM Constants

 

 

STGFMT Enumeration

STGMOVE Enumeration

STGTY Enumeration

STREAM_SEEK Enumeration

 

LOCKTYPE Enumeration

 

The LOCKTYPE enumeration values indicate the type of locking requested for the specified range of bytes. The values are used in the ILockBytes::LockRegion and IStream::LockRegion methods.

 

 

%LOCK_WRITE = 1
%LOCK_EXCLUSIVE = 2
%LOCK_ONLYONCE = 4

 

 

PROPSETFLAGS Constants

 

The PROPSETFLAG constants define characteristics of a property set. The values, listed in the following table, are used in the grfFlags parameter of IPropertySetStorage methods, the StgCreatePropStg function, and the StgOpenPropStg function.

 

 

%PROPSETFLAG_DEFAULT = 0
%PROPSETFLAG_NONSIMPLE = 1
%PROPSETFLAG_ANSI = 2
%PROPSETFLAG_UNBUFFERED = 4
%PROPSETFLAG_CASE_SENSITIVE = 8
 

 

STATFLAG Enumeration

 

The STATFLAG enumeration values indicate whether the method should try to return a name in the pwcsName member of the STATSTG structure. The values are used in the ILockBytes::Stat, IStorage::Stat, and IStream::Stat methods to save memory when the pwcsName member is not required.

 

 

%STATFLAG_DEFAULT = 0
%STATFLAG_NONAME = 1
%STATFLAG_NOOPEN = 2
 

 

STGC Enumeration

 

The STGC enumeration constants specify the conditions for performing the commit operation in the IStorage::Commit and IStream::Commit methods.

 

 

%STGC_DEFAULT = 0
%STGC_OVERWRITE = 1
%STGC_ONLYIFCURRENT = 2
%STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
%STGC_CONSOLIDATE = 8
 

 

STGFMT Enumeration

 

The STGFMT enumeration values specify the format of a storage object and are used in the StgCreateStorageEx and StgOpenStorageEx functions in the stgfmt parameter. This value, in combination with the value in the riid parameter, is used to determine the file format and the interface implementation to use.

 

 

%STGFMT_STORAGE = 0
%STGFMT_FILE = 3
%STGFMT_ANY = 4
%STGFMT_DOCFILE = 5
 

 

STGM Constants

 

The STGM constants are flags that indicate conditions for creating and deleting the object and access modes for the object. The STGM constants are included in the IStorage, IStream, and IPropertySetStorage interfaces and in the StgCreateDocfile, StgCreateStorageEx, StgCreateDocfileOnILockBytes, StgOpenStorage, and StgOpenStorageEx functions.

 

These elements are often combined using an OR operator. They are interpreted in groups as listed in the following table. It is not valid to use more than one element from a single group.

 

Use a flag from the creation group when creating an object, such as with StgCreateStorageEx or IStorage::CreateStream.

 

 

%STGM_READ = &H00000000&
%STGM_WRITE = &H00000001&
%STGM_READWRITE = &H00000002&
%STGM_SHARE_DENY_NONE = &H00000040&
%STGM_SHARE_DENY_READ = &H00000030&
%STGM_SHARE_DENY_WRITE = &H00000020&
%STGM_SHARE_EXCLUSIVE = &H00000010&
%STGM_PRIORITY = &H00040000&
%STGM_CREATE = &H00001000&
%STGM_CONVERT = &H00020000&
%STGM_FAILIFTHERE = &H00000000&
%STGM_DIRECT = &H00000000&
%STGM_TRANSACTED = &H00010000&
%STGM_NOSCRATCH = &H00100000&
%STGM_NOSNAPSHOT = &H00200000&
%STGM_SIMPLE = &H08000000&
%STGM_DIRECT_SWMR = &H00400000&
%STGM_DELETEONRELEASE = &H04000000&
 

 

STGMOVE Enumeration

 

The STGMOVE enumeration values indicate whether a storage element is to be moved or copied. They are used in the IStorage::MoveElementTo method.

 

 

%STGMOVE_MOVE = 0
%STGMOVE_COPY = 1
%STGMOVE_SHALLOWCOPY = 2
 

 

STGTY Enumeration

 

The STGTY enumeration values are used in the type member of the STATSTG structure to indicate the type of the storage element. A storage element is a storage object, a stream object, or a byte-array object (LOCKBYTES).

 

 

%STGTY_STORAGE = 1
%STGTY_STREAM = 2
%STGTY_LOCKBYTES = 3
%STGTY_PROPERTY = 4
 

 

STREAM_SEEK Enumeration

 

The STREAM_SEEK enumeration values specify the origin from which to calculate the new seek-pointer location. They are used for the dworigin parameter in the IStream::Seek method. The new seek position is calculated using this value and the dlibMove parameter.

 

 

%STREAM_SEEK_SET = 0
%STREAM_SEEK_CUR = 1
%STREAM_SEEK_END = 2
 

 

Page last updated on Saturday, 07 January 2006 18:05:20 +0100