Partager via


ATOMIC_CREATE_ECP_CONTEXT structure

This structure allows supplemental operations to be performed on a file atomically during create. Use the

Syntax

typedef struct _ATOMIC_CREATE_ECP_CONTEXT {
  USHORT                                                           Size;
  USHORT                                                           InFlags;
  USHORT                                                           OutFlags;
  USHORT                                                           ReparseBufferLength;
  _Field_size_bytes_opt_(ReparseBufferLength) PREPARSE_DATA_BUFFER ReparseBuffer;
  LONGLONG                                                         FileSize;
  LONGLONG                                                         ValidDataLength;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
  PFILE_TIMESTAMPS                                                 FileTimestamps;
#endif 
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
  ULONG                                                            FileAttributes;
  ULONG                                                            UsnSourceInfo;
  USN                                                              Usn;
#endif 
} ATOMIC_CREATE_ECP_CONTEXT, *PATOMIC_CREATE_ECP_CONTEXT;

Members

  • Size
    The size of the context structure.

  • InFlags
    Flags that indicate the requested supplemental operation(s) to be performed with the create operation.

    Value Meaning
    ATOMIC_CREATE_ECP_IN_FLAG_SPARSE_SPECIFIED 0x0001

    Requests that the sparse flag be set on the file.

    ATOMIC_CREATE_ECP_IN_FLAG_REPARSE_POINT_SPECIFIED 0x0002

    Requests that a reparse point be set on the file.

    ATOMIC_CREATE_ECP_IN_FLAG_EOF_SPECIFIED 0x0004

    Requests that a file size be set on the file. This also implies that on-disk allocation will occur to support the requested file size.

    ATOMIC_CREATE_ECP_IN_FLAG_VDL_SPECIFIED 0x0008

    Requests that a valid data length be set on the file. This also implies that the file size be set to at least the requested valid data length.

    Note  This is considered a privileged operation if it could potentially expose uninitialized data.
     
    ATOMIC_CREATE_ECP_IN_FLAG_OPERATION_MASK 0x00ff

    Use this flag as a mask to specify the other InFlags flag values.

    ATOMIC_CREATE_ECP_IN_FLAG_BEST_EFFORT 0x0100

    Indicates that the file system should perform the create operation even if some of the requested supplemental operations could not be performed or are not supported by the file system. The caller may check the OutFlags to see which operations were performed. If this flag is not specified, the file system should fail the create operation if it cannot successfully perform all of the requested supplemental operations.

     

  • OutFlags
    Flags that indicate the actual supplemental operation(s) performed with a successful create operation.

    Value Meaning
    ATOMIC_CREATE_ECP_OUT_FLAG_SPARSE_SET 0x0001

    Indicates that the sparse flag was set on the file.

    ATOMIC_CREATE_ECP_OUT_FLAG_REPARSE_POINT_SET 0x0002

    Indicates that a reparse point was set on the file.

    ATOMIC_CREATE_ECP_OUT_FLAG_EOF_SET 0x0004

    Indicates that a file size was set on the file, and that on-disk allocation occurred to support the requested file size.

    ATOMIC_CREATE_ECP_OUT_FLAG_VDL_SET 0x0008

    Indicates that a valid data length was set on the file, and that the file size was set to at least the requested valid data length.

    ATOMIC_CREATE_ECP_OUT_FLAG_OPERATION_MASK 0x00ff

    Use this flag value as a mask to determine the supplemental operations that were performed with the create operation.

     

  • ReparseBufferLength
    The length of the ReparseBuffer member. This value can't exceed the MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16K).

  • ReparseBuffer
    The optional value that indicates the type of buffer used in the create operation. Possible values are REPARSE_DATA_BUFFER or REPARSE_GUID_DATA_BUFFER.

  • FileSize
    The optional value that is used with ATOMIC_CREATE_ECP_IN_FLAG_EOF_SPECIFIED to indicate the requested file size to be set on the file.

  • ValidDataLength
    The optional value that is used with ATOMIC_CREATE_ECP_IN_FLAG_VDL_SPECIFIED to indicate the requested valid data length to be set on the file.

  • FileTimestamps
    Pointer to an optional FILE_TIMESTAMPS structure which contains the last recorded instance of specific actions on a file.

  • FileAttributes
    Specifies the attributes of a file.

  • UsnSourceInfo
    Specifies optional Update Sequence Number (USN) source info flags.

  • Usn
    Specifies the Update Sequence Number (USN). This value is filled at the end of GUID_ECP_ATOMIC_CREATE .

Remarks

The GUID used for this structure is the GUID_ECP_ATOMIC_CREATE (4720bd83-52ac-4104-a130-d1ec6a8cc8e5).

Requirements

Minimum supported client

Windows 10, version 1607

Minimum supported server

Windows Server 2016

Header

Ntifs.h

 

 

Send comments about this topic to Microsoft