This site is moving to The Zen Source Library
Please Update your bookmarks

STGM Constants

If you take a look at the help file, you'll see that there are quite a few STGM constants. I'll only discuss the ones used in this article and one or two of general interest.
STGM_WRITE Write only access
STGM_READ Read only access
STGM_READWRITE Read & Write Access
STGM_SHARE_DENY_NONE Don't deny subsequent access
STGM_SHARE_DENY_READ Deny subsequent read access
STGM_SHARE_DENY_WRITE Deny subsequent write access
STGM_SHARE_EXCLUSIVE No other app may open the file subsequently
STGM_CREATE If there is an existing stream / storage it is removed. If there is not an existing stream / storage a new one is created
STGM_FAILIFTHERE If a storage or stream already exists with the specified name, then fail
STGM_DIRECT All changes to the DocFile occur immediately
STGM_TRANSACTED Changes are not written until Commit is called. Similar to commit and rollback in a database. (Not discussed further in this article)
STGM_DELETEONRELEASE Storage or stream created with this flag is automatically deleted when its parent storage is released. Very useful for temporary files!

All information on these www pages is copyright (©) 1997 Andre .v.d. Merwe And may not be copied or mirrored without my permission.