This command is used to create or open a file or a directory, when EAs or an SD must be applied to the file.
Request Parameter Block Encoding =================================== |
Description ================================ |
ULONG Flags; | Creation flags (see below) |
ULONG RootDirectoryFid; | Optional directory for relative open |
ACCESS_MASK DesiredAccess; | Desired access |
LARGE_INTEGER AllocationSize; | The initial allocation size in bytes, if file created |
ULONG ExtFileAttributes; | The extended file attributes |
ULONG ShareAccess; | The share access |
ULONG CreateDisposition; | Action to take if file exists or not |
ULONG CreateOptions; | Options for creating a new file |
ULONG SecurityDescriptorLength; | Length of SD in bytes |
ULONG EaLength; | Length of EA in bytes |
ULONG NameLength; | Length of name in characters |
ULONG ImpersonationLevel; | Security QOS information |
UCHAR SecurityFlags; | Security QOS information |
STRING Name[NameLength]; | The name of the file (not NULL terminated) |
Data Block Encoding =================================== |
Description ================================ |
UCHAR SecurityDescriptor[ SecurityDescriptorLength]; | |
UCHAR ExtendedAttributes[EaLength]; |
Creation Flag Name ========================== |
Value ====== |
Description ================================== |
NT_CREATE_REQUEST_OPLOCK | 0x02 | Level I oplock requested |
NT_CREATE_REQUEST_OPBATCH | 0x04 | Batch oplock requested |
NT_CREATE_OPEN_TARGET_DIR | 0x08 | Target for open is a directory |
Output Parameter Block Encoding ================================== |
Description ================================== |
UCHAR OplockLevel; | The oplock level granted |
UCHAR Reserved; | |
USHORT Fid; | The file ID |
ULONG CreateAction; | The action taken |
ULONG EaErrorOffset; | Offset of the EA error |
TIME CreationTime; | The time the file was created |
TIME LastAccessTime; | The time the file was accessed |
TIME LastWriteTime; | The time the file was last written |
TIME ChangeTime; | The time the file was last changed |
ULONG ExtFileAttributes; | The file attributes |
LARGE_INTEGER AllocationSize; | The number of byes allocated |
LARGE_INTEGER EndOfFile; | The end of file offset |
USHORT FileType; | |
USHORT DeviceState; | state of IPC device (e.g. pipe) |
BOOLEAN Directory; | TRUE if this is a directory |
See the description of NT_CREATE_ANDX for the definition of the parameters.