Compartilhar via


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.

Syntax

typedef enum tagSTGFMT { 
  STGFMT_STORAGE  = 0,
  STGFMT_FILE     = 3,
  STGFMT_ANY      = 4,
  STGFMT_DOCFILE  = 5
} STGFMT;

Constants

  • STGFMT_STORAGE
    Indicates that the file must be a compound file.

  • STGFMT_FILE
    Indicates that the file must not be a compound file. This element is only valid when using the StgCreateStorageEx or StgOpenStorageEx functions to access the NTFS file system implementation of the IPropertySetStorage interface. Therefore, these functions return an error if the riid parameter does not specify the IPropertySetStorage interface, or if the specified file is not located on an NTFS file system volume.

  • STGFMT_ANY
    Indicates that the system will determine the file type and use the appropriate structured storage or property set implementation. This value cannot be used with the StgCreateStorageEx function.

  • STGFMT_DOCFILE
    Indicates that the file must be a compound file, and is similar to the STGFMT_STORAGE flag, but indicates that the compound-file form of the compound-file implementation must be used. For more information, see Compound File Implementation Limits.

Remarks

If the STGFMT value, specified to the StgCreateStorageEx or StgOpenStorageEx function, is STGFMT_FILE, the riid parameter must be the header-defined value for IID_IPropertySetStorage. It is not possible to get an IStorage interface for noncompound files. Similarly, if the STGFMT_ANY flag is specified to StgOpenStorageEx, and the file is not a compound file, the riid parameter must be IID_IPropertySetStorage.

Note  The STGM Constants values STGM_CONVERT, STGM_DELETEONRELEASE, STGM_PRIORITY, STGM_SIMPLE, and STGM_TRANSACTED cannot currently be used in the following situations.

 

  • In combination with the STGFMT_FILE flag.
  • In combination with the STGFMT_ANY flag if the file is not a compound file.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | UWP apps]

Minimum supported server

Windows 2000 Server [desktop apps | UWP apps]

Header

Objbase.h

See also

StgCreateStorageEx

StgOpenStorageEx