MF_FILE_OPENMODE enumeration

Specifies how to open or create a file.

Syntax


typedef enum  { 
  MF_OPENMODE_FAIL_IF_NOT_EXIST  = 0,
  MF_OPENMODE_FAIL_IF_EXIST      = 1,
  MF_OPENMODE_RESET_IF_EXIST     = 2,
  MF_OPENMODE_APPEND_IF_EXIST    = 3,
  MF_OPENMODE_DELETE_IF_EXIST    = 4
} MF_FILE_OPENMODE;

Constants

MF_OPENMODE_FAIL_IF_NOT_EXIST

Open an existing file. Fail if the file does not exist.

MF_OPENMODE_FAIL_IF_EXIST

Create a new file. Fail if the file already exists.

MF_OPENMODE_RESET_IF_EXIST

Open an existing file and truncate it, so that the size is zero bytes. Fail if the file does not already exist.

MF_OPENMODE_APPEND_IF_EXIST

If the file does not exist, create a new file. If the file exists, open it.

MF_OPENMODE_DELETE_IF_EXIST

Create a new file. If the file exists, overwrite the file.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfobjects.h (include Mfidl.h)

See also

Media Foundation Enumerations
MFBeginCreateFile
MFCreateFile
MFCreateTempFile

 

 

Show: