Value
|
Description
|
FILE_SHARE_READ
|
Subsequent open operations on the object will succeed only if read access is requested.
|
FILE_SHARE_WRITE
|
Subsequent open operations on the object will succeed only if write access is requested.
|
lpSecurityAttributes
Ignored; set to NULL.
dwCreationDispostion
Specifies which action to take on files that exist, and which action to take when files do not exist. For more information about this parameter, see the Remarks section. This parameter must be one of the following values:
-
Value
|
Description
|
CREATE_NEW
|
Creates a new file. The function fails if the specified file already exists.
|
CREATE_ALWAYS
|
Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes.
|
OPEN_EXISTING
|
Opens the file. The function fails if the file does not exist.
|
OPEN_ALWAYS
|
Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDisposition were CREATE_NEW.
|
TRUNCATE_EXISTING
|
Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist.
|
dwFlagsAndAttributes
Specifies the file attributes and flags for the file.
Any combination of the following attributes is acceptable for the dwFlagsAndAttributes parameter, except all other file attributes override FILE_ATTRIBUTE_NORMAL.
-
|