[This is preliminary documentation and subject to change.]
The STGFMT enumeration values specify the format of a storage object and are used in the StgCreateStorageEx and StgOpenStorageEx functions.
typedef enum tagSTGFMT
{
STGFMT_STORAGE = 0,
STGFMT_NATIVE = 1,
STGFMT_FILE = 3,
STGFMT_ANY = 4,
STGFMT_DOCFILE = 5
} STGFMT;
You use the STGFMT enumeration to specify what type of storage to access. When a file is created or opened, the structured storage implementation that is used depends on what STGFMT flag you specify and on what type of drive the file is stored.
Flag | Windows NT 5.0 NTFS drive | Windows NT 4.0 NTFS or any FAT drive |
---|---|---|
STGFMT_STORAGE | NTFS NSS first; then fallback to compound file | Compound File |
STGFMT_NATIVE | NTFS NSS | Not allowed |
STGFMT_FILE | NTFS Property Set | Not allowed |
STGFMT_DOCFILE | Compound File | Compound File |
STGFMT_ANY | Not allowed during create. During open, NSS will be used for structured storage files, otherwise flat file is used. | Not allowed during create. During open, Compound File will be used for structured storage files, otherwise Flat File will be used. |
Note At the command line prompt, you can run the "chkntfs /e" command to convert an NTFS 4.0 partition to an NTFS 5.0 partition.
The STGFMT flag specified also determines which interfaces can be returned from the storage functions:
Flag | IStorage | IStream | IProperty SetStorage |
Other |
---|
STGFMT_STORAGE | Yes | No | Yes | No |
STGFMT_NATIVE | Yes | No | Yes | No |
STGFMT_FILE | No | Yes | Yes | No |
STGFMT_DOCFILE | Yes | No | Yes | No |
STGFMT_ANY | Yes | Yes | Yes | Yes |
Windows NT: Use version 5.0 and later.
Windows CE: Unsupported.
Header: Declared in oleext.h.
StgCreateStorageEx, StgOpenStorageEx