|
|
dd89bb |
#ifndef _NT_FILE_H_
|
|
|
dd89bb |
#define _NT_FILE_H_
|
|
|
dd89bb |
|
|
|
414ad3 |
#include "nt_abi.h"
|
|
|
dd89bb |
#include "nt_object.h"
|
|
|
dd89bb |
#include "nt_device.h"
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_file_info_class {
|
|
|
dd89bb |
NT_FILE_DIRECTORY_INFORMATION = 1,
|
|
|
dd89bb |
NT_FILE_FULL_DIRECTORY_INFORMATION = 2,
|
|
|
dd89bb |
NT_FILE_BOTH_DIRECTORY_INFORMATION = 3,
|
|
|
dd89bb |
NT_FILE_BASIC_INFORMATION = 4,
|
|
|
dd89bb |
NT_FILE_STANDARD_INFORMATION = 5,
|
|
|
dd89bb |
NT_FILE_INTERNAL_INFORMATION = 6,
|
|
|
dd89bb |
NT_FILE_EA_INFORMATION = 7,
|
|
|
dd89bb |
NT_FILE_ACCESS_INFORMATION = 8,
|
|
|
dd89bb |
NT_FILE_NAME_INFORMATION = 9,
|
|
|
dd89bb |
NT_FILE_RENAME_INFORMATION = 10,
|
|
|
dd89bb |
NT_FILE_LINK_INFORMATION = 11,
|
|
|
dd89bb |
NT_FILE_NAMES_INFORMATION = 12,
|
|
|
dd89bb |
NT_FILE_DISPOSITION_INFORMATION = 13,
|
|
|
dd89bb |
NT_FILE_POSITION_INFORMATION = 14,
|
|
|
dd89bb |
NT_FILE_FULL_EA_INFORMATION = 15,
|
|
|
dd89bb |
NT_FILE_MODE_INFORMATION = 16,
|
|
|
dd89bb |
NT_FILE_ALIGNMENT_INFORMATION = 17,
|
|
|
dd89bb |
NT_FILE_ALL_INFORMATION = 18,
|
|
|
dd89bb |
NT_FILE_ALLOCATION_INFORMATION = 19,
|
|
|
dd89bb |
NT_FILE_END_OF_FILE_INFORMATION = 20,
|
|
|
dd89bb |
NT_FILE_ALTERNATE_NAME_INFORMATION = 21,
|
|
|
dd89bb |
NT_FILE_STREAM_INFORMATION = 22,
|
|
|
dd89bb |
NT_FILE_PIPE_INFORMATION = 23,
|
|
|
dd89bb |
NT_FILE_PIPE_LOCAL_INFORMATION = 24,
|
|
|
dd89bb |
NT_FILE_PIPE_REMOTE_INFORMATION = 25,
|
|
|
dd89bb |
NT_FILE_MAILSLOT_QUERY_INFORMATION = 26,
|
|
|
dd89bb |
NT_FILE_MAILSLOT_SET_INFORMATION = 27,
|
|
|
dd89bb |
NT_FILE_COMPRESSION_INFORMATION = 28,
|
|
|
dd89bb |
NT_FILE_OBJECT_ID_INFORMATION = 29,
|
|
|
dd89bb |
NT_FILE_COMPLETION_INFORMATION = 30,
|
|
|
dd89bb |
NT_FILE_MOVE_CLUSTER_INFORMATION = 31,
|
|
|
dd89bb |
NT_FILE_QUOTA_INFORMATION = 32,
|
|
|
dd89bb |
NT_FILE_REPARSE_POINT_INFORMATION = 33,
|
|
|
dd89bb |
NT_FILE_NETWORK_OPEN_INFORMATION = 34,
|
|
|
dd89bb |
NT_FILE_ATTRIBUTE_TAG_INFORMATION = 35,
|
|
|
dd89bb |
NT_FILE_TRACKING_INFORMATION = 36,
|
|
|
dd89bb |
NT_FILE_ID_BOTH_DIRECTORY_INFORMATION = 37,
|
|
|
dd89bb |
NT_FILE_ID_FULL_DIRECTORY_INFORMATION = 38,
|
|
|
dd89bb |
NT_FILE_VALID_DATA_LENGTH_INFORMATION = 39,
|
|
|
dd89bb |
NT_FILE_SHORT_NAME_INFORMATION = 40,
|
|
|
dd89bb |
NT_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION = 41,
|
|
|
dd89bb |
NT_FILE_IO_STATUS_BLOCK_RANGE_INFORMATION = 42,
|
|
|
dd89bb |
NT_FILE_IO_PRIORITY_HINT_INFORMATION = 43,
|
|
|
dd89bb |
NT_FILE_SFIO_RESERVE_INFORMATION = 44,
|
|
|
dd89bb |
NT_FILE_SFIO_VOLUME_INFORMATION = 45,
|
|
|
dd89bb |
NT_FILE_HARD_LINK_INFORMATION = 46,
|
|
|
dd89bb |
NT_FILE_PROCESS_IDS_USING_FILE_INFORMATION = 47,
|
|
|
dd89bb |
NT_FILE_NORMALIZED_NAME_INFORMATION = 48,
|
|
|
dd89bb |
NT_FILE_NETWORK_PHYSICAL_NAME_INFORMATION = 49,
|
|
|
dd89bb |
NT_FILE_ID_GLOBAL_TX_DIRECTORY_INFORMATION = 50,
|
|
|
dd89bb |
NT_FILE_IS_REMOTE_DEVICE_INFORMATION = 51,
|
|
|
dd89bb |
NT_FILE_ATTRIBUTE_CACHE_INFORMATION = 52,
|
|
|
dd89bb |
NT_FILE_NUMA_NODE_INFORMATION = 53,
|
|
|
dd89bb |
NT_FILE_STANDARD_LINK_INFORMATION = 54,
|
|
|
dd89bb |
NT_FILE_REMOTE_PROTOCOL_INFORMATION = 55,
|
|
|
dd89bb |
NT_FILE_REPLACE_COMPLETION_INFORMATION = 56,
|
|
|
dd89bb |
NT_FILE_INFORMATION_CAP = 57
|
|
|
dd89bb |
} nt_file_info_class;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_file_create_disposition {
|
|
|
dd89bb |
NT_FILE_SUPERSEDE = 0x00000000,
|
|
|
dd89bb |
NT_FILE_OPEN = 0x00000001,
|
|
|
dd89bb |
NT_FILE_CREATE = 0x00000002,
|
|
|
dd89bb |
NT_FILE_OPEN_IF = 0x00000003,
|
|
|
dd89bb |
NT_FILE_OVERWRITE = 0x00000004,
|
|
|
dd89bb |
NT_FILE_OVERWRITE_IF = 0x00000005
|
|
|
dd89bb |
} nt_file_create_disposition;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_file_status {
|
|
|
dd89bb |
NT_FILE_SUPERSEDED = 0x00000000,
|
|
|
dd89bb |
NT_FILE_OPENED = 0x00000001,
|
|
|
dd89bb |
NT_FILE_CREATED = 0x00000002,
|
|
|
dd89bb |
NT_FILE_OVERWRITTEN = 0x00000003,
|
|
|
dd89bb |
NT_FILE_EXISTS = 0x00000004,
|
|
|
dd89bb |
NT_FILE_DOES_NOT_EXIST = 0x00000005
|
|
|
dd89bb |
} nt_file_status;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_file_action {
|
|
|
dd89bb |
NT_FILE_ACTION_ADDED = 0x00000001,
|
|
|
dd89bb |
NT_FILE_ACTION_REMOVED = 0x00000002,
|
|
|
dd89bb |
NT_FILE_ACTION_MODIFIED = 0x00000003,
|
|
|
dd89bb |
NT_FILE_ACTION_RENAMED_OLD_NAME = 0x00000004,
|
|
|
dd89bb |
NT_FILE_ACTION_RENAMED_NEW_NAME = 0x00000005,
|
|
|
dd89bb |
NT_FILE_ACTION_ADDED_STREAM = 0x00000006,
|
|
|
dd89bb |
NT_FILE_ACTION_REMOVED_STREAM = 0x00000007,
|
|
|
dd89bb |
NT_FILE_ACTION_MODIFIED_STREAM = 0x00000008,
|
|
|
dd89bb |
NT_FILE_ACTION_REMOVED_BY_DELETE = 0x00000009,
|
|
|
dd89bb |
} nt_file_action;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_file_pipe_flags {
|
|
|
dd89bb |
NT_FILE_PIPE_BYTE_STREAM_MODE = 0x00000000,
|
|
|
dd89bb |
NT_FILE_PIPE_MESSAGE_MODE = 0x00000001,
|
|
|
dd89bb |
|
|
|
dd89bb |
NT_FILE_PIPE_QUEUE_OPERATION = 0x00000000,
|
|
|
dd89bb |
NT_FILE_PIPE_COMPLETE_OPERATION = 0x00000001,
|
|
|
dd89bb |
|
|
|
dd89bb |
NT_FILE_PIPE_BYTE_STREAM_TYPE = 0x00000000,
|
|
|
dd89bb |
NT_FILE_PIPE_MESSAGE_TYPE = 0x00000001,
|
|
|
dd89bb |
|
|
|
dd89bb |
NT_FILE_PIPE_INBOUND = 0x00000000,
|
|
|
dd89bb |
NT_FILE_PIPE_OUTBOUND = 0x00000001,
|
|
|
dd89bb |
NT_FILE_PIPE_FULL_DUPLEX = 0x00000002,
|
|
|
dd89bb |
|
|
|
dd89bb |
NT_FILE_PIPE_DISCONNECTED_STATE = 0x00000001,
|
|
|
dd89bb |
NT_FILE_PIPE_LISTENING_STATE = 0x00000002,
|
|
|
dd89bb |
NT_FILE_PIPE_CONNECTED_STATE = 0x00000003,
|
|
|
dd89bb |
NT_FILE_PIPE_CLOSING_STATE = 0x00000004,
|
|
|
dd89bb |
|
|
|
dd89bb |
NT_FILE_PIPE_CLIENT_END = 0x00000000,
|
|
|
dd89bb |
NT_FILE_PIPE_SERVER_END = 0x00000001,
|
|
|
dd89bb |
} nt_file_pipe_flags;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_io_priority_hint {
|
|
|
dd89bb |
NT_IO_PRIORITY_VERY_LOW = 0,
|
|
|
dd89bb |
NT_IO_PRIORITY_LOW = 1,
|
|
|
dd89bb |
NT_IO_PRIORITY_NORMAL = 2,
|
|
|
dd89bb |
NT_IO_PRIORITY_HIGH = 3,
|
|
|
dd89bb |
NT_IO_PRIORITY_CRITICAL = 4,
|
|
|
dd89bb |
NT_MAX_IO_PRIORITY_TYPES = 5
|
|
|
dd89bb |
} nt_io_priority_hint;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef enum _nt_fs_info_class {
|
|
|
dd89bb |
NT_FILE_FS_VOLUME_INFORMATION = 1,
|
|
|
dd89bb |
NT_FILE_FS_LABEL_INFORMATION = 2,
|
|
|
dd89bb |
NT_FILE_FS_SIZE_INFORMATION = 3,
|
|
|
dd89bb |
NT_FILE_FS_DEVICE_INFORMATION = 4,
|
|
|
dd89bb |
NT_FILE_FS_ATTRIBUTE_INFORMATION = 5,
|
|
|
dd89bb |
NT_FILE_FS_CONTROL_INFORMATION = 6,
|
|
|
dd89bb |
NT_FILE_FS_FULL_SIZE_INFORMATION = 7,
|
|
|
dd89bb |
NT_FILE_FS_OBJECT_ID_INFORMATION = 8,
|
|
|
dd89bb |
NT_FILE_FS_DRIVER_PATH_INFORMATION = 9,
|
|
|
dd89bb |
NT_FILE_FS_VOLUME_FLAGS_INFORMATION = 10,
|
|
|
dd89bb |
NT_FILE_FS_SECTOR_SIZE_INFORMATION = 11,
|
|
|
dd89bb |
} nt_fs_info_class;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file attributes */
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_READONLY 0x00000001
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_HIDDEN 0x00000002
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_SYSTEM 0x00000004
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_DIRECTORY 0x00000010
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_ARCHIVE 0x00000020
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_DEVICE 0x00000040
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_NORMAL 0x00000080
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_TEMPORARY 0x00000100
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_COMPRESSED 0x00000800
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_OFFLINE 0x00001000
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_ENCRYPTED 0x00004000
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_INTEGRITY_STREAM 0x00008000
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_VIRTUAL 0x00010000
|
|
|
dd89bb |
#define NT_FILE_ATTRIBUTE_NO_SCRUB_DATA 0x00020000
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file create options */
|
|
|
dd89bb |
#define NT_FILE_ASYNCHRONOUS_IO 0x00000000
|
|
|
dd89bb |
#define NT_FILE_DIRECTORY_FILE 0x00000001
|
|
|
dd89bb |
#define NT_FILE_WRITE_THROUGH 0x00000002
|
|
|
dd89bb |
#define NT_FILE_SEQUENTIAL_ONLY 0x00000004
|
|
|
dd89bb |
#define NT_FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
|
|
|
dd89bb |
#define NT_FILE_SYNCHRONOUS_IO_ALERT 0x00000010
|
|
|
dd89bb |
#define NT_FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
|
|
|
dd89bb |
#define NT_FILE_NON_DIRECTORY_FILE 0x00000040
|
|
|
dd89bb |
#define NT_FILE_CREATE_TREE_CONNECTION 0x00000080
|
|
|
dd89bb |
#define NT_FILE_COMPLETE_IF_OPLOCKED 0x00000100
|
|
|
dd89bb |
#define NT_FILE_NO_EA_KNOWLEDGE 0x00000200
|
|
|
dd89bb |
#define NT_FILE_OPEN_REMOTE_INSTANCE 0x00000400
|
|
|
dd89bb |
#define NT_FILE_RANDOM_ACCESS 0x00000800
|
|
|
dd89bb |
#define NT_FILE_DELETE_ON_CLOSE 0x00001000
|
|
|
dd89bb |
#define NT_FILE_OPEN_BY_FILE_ID 0x00002000
|
|
|
dd89bb |
#define NT_FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
|
|
|
dd89bb |
#define NT_FILE_NO_COMPRESSION 0x00008000
|
|
|
dd89bb |
#define NT_FILE_SESSION_AWARE 0x00040000
|
|
|
dd89bb |
#define NT_FILE_RESERVE_OPFILTER 0x00100000
|
|
|
dd89bb |
#define NT_FILE_OPEN_REPARSE_POINT 0x00200000
|
|
|
dd89bb |
#define NT_FILE_OPEN_NO_RECALL 0x00400000
|
|
|
dd89bb |
#define NT_FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file share access */
|
|
|
dd89bb |
#define NT_FILE_SHARE_READ 0x00000001
|
|
|
dd89bb |
#define NT_FILE_SHARE_WRITE 0x00000002
|
|
|
dd89bb |
#define NT_FILE_SHARE_DELETE 0x00000004
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file notify */
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_SIZE 0x00000008
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_CREATION 0x00000040
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_EA 0x00000040
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_SECURITY 0x00000100
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000100
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000100
|
|
|
dd89bb |
#define NT_FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000100
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file system flags */
|
|
|
dd89bb |
#define NT_FILE_CASE_SENSITIVE_SEARCH 0x00000001
|
|
|
dd89bb |
#define NT_FILE_CASE_PRESERVED_NAMES 0x00000002
|
|
|
dd89bb |
#define NT_FILE_UNICODE_ON_DISK 0x00000004
|
|
|
dd89bb |
#define NT_FILE_PERSISTENT_ACLS 0x00000008
|
|
|
dd89bb |
#define NT_FILE_FILE_COMPRESSION 0x00000010
|
|
|
dd89bb |
#define NT_FILE_VOLUME_QUOTAS 0x00000020
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_SPARSE_FILES 0x00000040
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_REPARSE_POINTS 0x00000080
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
|
|
|
dd89bb |
#define NT_FILE_VOLUME_IS_COMPRESSED 0x00008000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_OBJECT_IDS 0x00010000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_ENCRYPTION 0x00020000
|
|
|
dd89bb |
#define NT_FILE_NAMED_STREAMS 0x00040000
|
|
|
dd89bb |
#define NT_FILE_READ_ONLY_VOLUME 0x00080000
|
|
|
dd89bb |
#define NT_FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_TRANSACTIONS 0x00200000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_HARD_LINKS 0x00400000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000
|
|
|
dd89bb |
#define NT_FILE_SUPPORTS_USN_JOURNAL 0x02000000
|
|
|
dd89bb |
#define NT_FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file sector size flags */
|
|
|
dd89bb |
#define NT_SSINFO_FLAGS_ALIGNED_DEVICE 0x00000001
|
|
|
dd89bb |
#define NT_SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE 0x00000002
|
|
|
dd89bb |
#define NT_SSINFO_FLAGS_NO_SEEK_PENALTY 0x00000004
|
|
|
dd89bb |
#define NT_SSINFO_FLAGS_TRIM_ENABLED 0x00000008
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file alignment flags */
|
|
|
dd89bb |
#define NT_FILE_BYTE_ALIGNMENT 0x00000000
|
|
|
dd89bb |
#define NT_FILE_WORD_ALIGNMENT 0x00000001
|
|
|
dd89bb |
#define NT_FILE_LONG_ALIGNMENT 0x00000003
|
|
|
dd89bb |
#define NT_FILE_QUAD_ALIGNMENT 0x00000007
|
|
|
dd89bb |
#define NT_FILE_OCTA_ALIGNMENT 0x0000000f
|
|
|
dd89bb |
#define NT_FILE_32_BYTE_ALIGNMENT 0x0000001f
|
|
|
dd89bb |
#define NT_FILE_64_BYTE_ALIGNMENT 0x0000003f
|
|
|
dd89bb |
#define NT_FILE_128_BYTE_ALIGNMENT 0x0000007f
|
|
|
dd89bb |
#define NT_FILE_256_BYTE_ALIGNMENT 0x000000ff
|
|
|
dd89bb |
#define NT_FILE_512_BYTE_ALIGNMENT 0x000001ff
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file tx info flags */
|
|
|
dd89bb |
#define NT_FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_WRITELOCKED 0x00000001
|
|
|
dd89bb |
#define NT_FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_VISIBLE_TO_TX 0x00000002
|
|
|
dd89bb |
#define NT_FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_VISIBLE_OUTSIDE_TX 0x00000004
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* friendly file type bits */
|
|
|
dd89bb |
#define NT_FILE_TYPE_UNKNOWN (0x0000u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_FILE (0x0001u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_DIRECTORY (0x0002u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_PIPE (0x0004u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_SOCKET (0x0008u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_MAILSLOT (0x0010u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_CSRSS (0x0020u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_PTY (0x0040u)
|
|
|
dd89bb |
#define NT_FILE_TYPE_VFD (0x0080u)
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file access bits */
|
|
|
dd89bb |
#define NT_FILE_ANY_ACCESS (0x0000u)
|
|
|
dd89bb |
#define NT_FILE_READ_ACCESS (0x0001u)
|
|
|
dd89bb |
#define NT_FILE_READ_DATA (0x0001u)
|
|
|
dd89bb |
#define NT_FILE_LIST_DIRECTORY (0x0001u)
|
|
|
dd89bb |
#define NT_FILE_WRITE_ACCESS (0x0002u)
|
|
|
dd89bb |
#define NT_FILE_WRITE_DATA (0x0002u)
|
|
|
dd89bb |
#define NT_FILE_ADD_FILE (0x0002u)
|
|
|
dd89bb |
#define NT_FILE_APPEND_DATA (0x0004u)
|
|
|
dd89bb |
#define NT_FILE_ADD_SUBDIRECTORY (0x0004u)
|
|
|
dd89bb |
#define NT_FILE_CREATE_PIPE_INSTANCE (0x0004u)
|
|
|
dd89bb |
#define NT_FILE_READ_EA (0x0008u)
|
|
|
dd89bb |
#define NT_FILE_WRITE_EA (0x0010u)
|
|
|
dd89bb |
#define NT_FILE_EXECUTE (0x0020u)
|
|
|
dd89bb |
#define NT_FILE_TRAVERSE (0x0020u)
|
|
|
dd89bb |
#define NT_FILE_DELETE_CHILD (0x0040u)
|
|
|
dd89bb |
#define NT_FILE_READ_ATTRIBUTES (0x0080u)
|
|
|
dd89bb |
#define NT_FILE_WRITE_ATTRIBUTES (0x0100u)
|
|
|
dd89bb |
|
|
|
02d60e |
#define NT_FILE_GENERIC_WRITE NT_FILE_WRITE_ATTRIBUTES \
|
|
|
02d60e |
| NT_FILE_WRITE_DATA \
|
|
|
02d60e |
| NT_FILE_WRITE_EA \
|
|
|
02d60e |
| NT_FILE_APPEND_DATA \
|
|
|
02d60e |
| NT_SEC_READ_CONTROL \
|
|
|
02d60e |
| NT_SEC_SYNCHRONIZE
|
|
|
02d60e |
|
|
|
dd89bb |
#define NT_FILE_ALL_ACCESS NT_FILE_ANY_ACCESS \
|
|
|
dd89bb |
| NT_FILE_READ_ACCESS \
|
|
|
dd89bb |
| NT_FILE_WRITE_ACCESS \
|
|
|
dd89bb |
| NT_FILE_APPEND_DATA \
|
|
|
dd89bb |
| NT_FILE_READ_EA \
|
|
|
dd89bb |
| NT_FILE_WRITE_EA \
|
|
|
dd89bb |
| NT_FILE_EXECUTE \
|
|
|
dd89bb |
| NT_FILE_TRAVERSE \
|
|
|
dd89bb |
| NT_FILE_DELETE_CHILD \
|
|
|
dd89bb |
| NT_FILE_READ_ATTRIBUTES \
|
|
|
dd89bb |
| NT_FILE_WRITE_ATTRIBUTES \
|
|
|
dd89bb |
| NT_SEC_SYNCHRONIZE \
|
|
|
dd89bb |
| NT_SEC_STANDARD_RIGHTS_ALL
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* structures related to nt_fs_info_class */
|
|
|
dd89bb |
typedef struct _nt_file_fs_volume_information {
|
|
|
dd89bb |
nt_large_integer volume_creation_time;
|
|
|
dd89bb |
uint32_t volume_serial_number;
|
|
|
dd89bb |
uint32_t volume_label_length;
|
|
|
dd89bb |
unsigned char supports_objects ;
|
|
|
dd89bb |
unsigned char reserved;
|
|
|
dd89bb |
wchar16_t volume_label[];
|
|
|
dd89bb |
} nt_file_fs_volume_information, nt_fsvi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_label_information {
|
|
|
dd89bb |
uint32_t volume_label_length;
|
|
|
dd89bb |
wchar16_t volume_label[];
|
|
|
dd89bb |
} nt_file_fs_label_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_size_information {
|
|
|
dd89bb |
nt_large_integer total_allocation_units;
|
|
|
dd89bb |
nt_large_integer available_allocation_units;
|
|
|
dd89bb |
uint32_t sectors_per_allocation_unit;
|
|
|
dd89bb |
uint32_t bytes_per_sector;
|
|
|
dd89bb |
} nt_file_fs_size_information, nt_fssi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_device_information {
|
|
|
dd89bb |
nt_device_type device_type;
|
|
|
dd89bb |
uint32_t characteristics;
|
|
|
dd89bb |
} nt_file_fs_device_information, nt_fsdi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_attribute_information {
|
|
|
dd89bb |
uint32_t file_system_attributes;
|
|
|
dd89bb |
uint32_t maximum_component_name_length;
|
|
|
dd89bb |
uint32_t file_system_name_length;
|
|
|
dd89bb |
wchar16_t file_system_name[];
|
|
|
dd89bb |
} nt_file_fs_attribute_information, nt_fsai;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_control_information {
|
|
|
dd89bb |
nt_large_integer free_space_start_filtering;
|
|
|
dd89bb |
nt_large_integer free_space_threshold;
|
|
|
dd89bb |
nt_large_integer free_space_stop_filtering;
|
|
|
dd89bb |
nt_large_integer default_quota_threshold;
|
|
|
dd89bb |
nt_large_integer default_quota_limit;
|
|
|
dd89bb |
uint32_t file_system_control_flags;
|
|
|
dd89bb |
uint32_t padding;
|
|
|
dd89bb |
} nt_file_fs_control_information, nt_fsci;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_full_size_information {
|
|
|
dd89bb |
nt_large_integer total_allocation_units;
|
|
|
dd89bb |
nt_large_integer caller_available_allocation_units;
|
|
|
dd89bb |
nt_large_integer actual_available_allocation_units;
|
|
|
dd89bb |
uint32_t sectors_per_allocation_unit;
|
|
|
dd89bb |
uint32_t bytes_per_sector;
|
|
|
dd89bb |
} nt_file_fs_full_size_information, nt_fsfsi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_object_id_information {
|
|
|
dd89bb |
nt_uuid volume_object_id;
|
|
|
dd89bb |
uint32_t volume_object_id_extended_info;
|
|
|
dd89bb |
} nt_file_fs_object_id_information, nt_fsoii;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_driver_path_information {
|
|
|
dd89bb |
unsigned char driver_in_path;
|
|
|
dd89bb |
unsigned char reserved[3];
|
|
|
dd89bb |
uint32_t driver_name_length;
|
|
|
dd89bb |
wchar16_t driver_name[];
|
|
|
dd89bb |
} nt_file_fs_driver_path_information, nt_fsdpi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_sector_size_information {
|
|
|
dd89bb |
uint32_t logical_bytes_per_sector;
|
|
|
dd89bb |
uint32_t physical_bytes_per_sector_for_atomicity;
|
|
|
dd89bb |
uint32_t physical_bytes_per_sector_for_performance;
|
|
|
dd89bb |
uint32_t effective_physical_bytes_per_sector_for_atomicity;
|
|
|
dd89bb |
uint32_t flags;
|
|
|
dd89bb |
uint32_t byte_offset_for_sector_alignment;
|
|
|
dd89bb |
uint32_t byte_offset_for_partition_alignment;
|
|
|
dd89bb |
} nt_file_fs_sector_size_information, nt_fsssi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_fs_persistent_volume_information {
|
|
|
dd89bb |
uint32_t volume_flags;
|
|
|
dd89bb |
uint32_t flag_mask;
|
|
|
dd89bb |
uint32_t version;
|
|
|
dd89bb |
uint32_t reserved;
|
|
|
dd89bb |
} nt_file_fs_persistent_volume_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* structures related to zw_query_quota_information_file */
|
|
|
dd89bb |
typedef struct _nt_file_user_quota_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t sid_length;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer quota_used;
|
|
|
dd89bb |
nt_large_integer quota_threshold;
|
|
|
dd89bb |
nt_large_integer quota_limit;
|
|
|
dd89bb |
nt_sid sid[];
|
|
|
dd89bb |
} nt_file_user_quota_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_quota_list_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t sid_length;
|
|
|
dd89bb |
nt_sid sid[];
|
|
|
dd89bb |
} nt_file_quota_list_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* structures included in nt_file_all_information */
|
|
|
dd89bb |
typedef struct _nt_file_basic_information {
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
uint32_t file_attr;
|
|
|
dd89bb |
} nt_file_basic_information, nt_fbi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_standard_information {
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
uint32_t number_of_links;
|
|
|
dd89bb |
unsigned char delete_pending;
|
|
|
dd89bb |
unsigned char directory;
|
|
|
dd89bb |
unsigned char reserved[2];
|
|
|
dd89bb |
} nt_file_standard_information, nt_fsi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_internal_information {
|
|
|
dd89bb |
nt_large_integer index_number;
|
|
|
dd89bb |
} nt_file_internal_information, nt_fii;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_ea_information {
|
|
|
dd89bb |
uint32_t ea_size;
|
|
|
dd89bb |
} nt_file_ea_information, nt_fei;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_access_information {
|
|
|
dd89bb |
uint32_t access_flags;
|
|
|
dd89bb |
} nt_file_access_information, nt_facci;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_position_information {
|
|
|
dd89bb |
nt_large_integer current_byte_offset;
|
|
|
dd89bb |
} nt_file_position_information, nt_fpi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_mode_information {
|
|
|
dd89bb |
uint32_t mode;
|
|
|
dd89bb |
} nt_file_mode_information, nt_fmi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_alignment_information {
|
|
|
dd89bb |
uint32_t alignment_requirement;
|
|
|
dd89bb |
} nt_file_alignment_information, nt_falii;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_name_information {
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_name_information, nt_fni;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_all_information {
|
|
|
dd89bb |
nt_file_basic_information basic_info;
|
|
|
dd89bb |
nt_file_standard_information standard_info;
|
|
|
dd89bb |
nt_file_internal_information internal_info;
|
|
|
dd89bb |
nt_file_ea_information ea_info;
|
|
|
dd89bb |
nt_file_access_information access_info;
|
|
|
dd89bb |
nt_file_position_information position_info;
|
|
|
dd89bb |
nt_file_mode_information mode_info;
|
|
|
dd89bb |
nt_file_alignment_information alignment_info;
|
|
|
dd89bb |
nt_file_name_information name_info;
|
|
|
dd89bb |
} nt_file_all_information, nt_fai;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* structures related to nt_file_info_class */
|
|
|
dd89bb |
typedef struct _nt_file_directory_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_directory_information, nt_fdiri;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_full_dir_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
uint32_t ea_size;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_full_dir_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_both_dir_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
uint32_t ea_size;
|
|
|
dd89bb |
char short_name_length;
|
|
|
dd89bb |
char reserved;
|
|
|
dd89bb |
wchar16_t short_name[12];
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_both_dir_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_rename_information {
|
|
|
dd89bb |
unsigned char replace_if_exists;
|
|
|
dd89bb |
void * root_directory;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_rename_information, nt_frni;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_link_information {
|
|
|
dd89bb |
unsigned char replace_if_exists;
|
|
|
dd89bb |
void * root_directory;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_link_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_names_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_names_information, nt_fnamesi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_disposition_information {
|
|
|
dd89bb |
unsigned char delete_file;
|
|
|
dd89bb |
} nt_file_disposition_information, nt_fdi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_full_ea_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
unsigned char flags;
|
|
|
dd89bb |
unsigned char ea_name_length;
|
|
|
dd89bb |
uint16_t ea_value_length;
|
|
|
dd89bb |
char ea_name[];
|
|
|
dd89bb |
} nt_file_full_ea_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_allocation_information {
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
} nt_file_allocation_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_end_of_file_information {
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
} nt_file_end_of_file_information, nt_eof;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_stream_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t stream_name_length;
|
|
|
dd89bb |
nt_large_integer stream_size;
|
|
|
dd89bb |
nt_large_integer stream_allocation_size;
|
|
|
dd89bb |
wchar16_t stream_name[];
|
|
|
dd89bb |
} nt_file_stream_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_pipe_information {
|
|
|
dd89bb |
uint32_t read_mode;
|
|
|
dd89bb |
uint32_t completion_mode;
|
|
|
dd89bb |
} nt_file_pipe_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_pipe_local_information {
|
|
|
dd89bb |
uint32_t named_pipe_type;
|
|
|
dd89bb |
uint32_t named_pipe_configuration;
|
|
|
dd89bb |
uint32_t maximum_instances;
|
|
|
dd89bb |
uint32_t current_instances;
|
|
|
dd89bb |
uint32_t inbound_quota;
|
|
|
dd89bb |
uint32_t read_data_available;
|
|
|
dd89bb |
uint32_t outbound_quota;
|
|
|
dd89bb |
uint32_t write_quota_available;
|
|
|
dd89bb |
uint32_t named_pipe_state;
|
|
|
dd89bb |
uint32_t named_pipe_end;
|
|
|
dd89bb |
} nt_file_pipe_local_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_pipe_remote_information {
|
|
|
dd89bb |
nt_large_integer collect_data_time;
|
|
|
dd89bb |
uint32_t maximum_collection_count;
|
|
|
dd89bb |
} nt_file_pipe_remote_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_mailslot_query_information {
|
|
|
dd89bb |
uint32_t maximum_message_size;
|
|
|
dd89bb |
uint32_t mailslot_quota;
|
|
|
dd89bb |
uint32_t next_message_size;
|
|
|
dd89bb |
uint32_t messages_available;
|
|
|
dd89bb |
nt_large_integer read_timeout;
|
|
|
dd89bb |
} nt_file_mailslot_query_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_mailslot_set_information {
|
|
|
dd89bb |
nt_large_integer * read_timeout;
|
|
|
dd89bb |
} nt_file_mailslot_set_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_compression_information {
|
|
|
dd89bb |
nt_large_integer CompressedFileSize;
|
|
|
dd89bb |
uint16_t CompressionFormat;
|
|
|
dd89bb |
unsigned char CompressionUnitShift;
|
|
|
dd89bb |
unsigned char ChunkShift;
|
|
|
dd89bb |
unsigned char ClusterShift;
|
|
|
dd89bb |
unsigned char Reserved[3];
|
|
|
dd89bb |
} nt_file_compression_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_object_id_buffer {
|
|
|
dd89bb |
unsigned char obj_id[16];
|
|
|
dd89bb |
unsigned char birth_volume_id[16];
|
|
|
dd89bb |
unsigned char birth_object_id[16];
|
|
|
dd89bb |
unsigned char domain_id[16];
|
|
|
dd89bb |
} nt_file_object_id_buffer;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_object_id_information {
|
|
|
dd89bb |
int64_t file_reference;
|
|
|
dd89bb |
unsigned char object_id[16];
|
|
|
dd89bb |
|
|
|
dd89bb |
union {
|
|
|
dd89bb |
struct {
|
|
|
dd89bb |
unsigned char birth_volume_id[16];
|
|
|
dd89bb |
unsigned char birth_object_id[16];
|
|
|
dd89bb |
unsigned char domain_id[16];
|
|
|
dd89bb |
};
|
|
|
dd89bb |
unsigned char extended_info[48];
|
|
|
dd89bb |
};
|
|
|
dd89bb |
} nt_file_object_id_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_quota_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t sid_length;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer quota_used;
|
|
|
dd89bb |
nt_large_integer quota_threshold;
|
|
|
dd89bb |
nt_large_integer quota_limit;
|
|
|
dd89bb |
nt_sid sid;
|
|
|
dd89bb |
} nt_file_quota_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_reparse_point_information {
|
|
|
dd89bb |
int64_t file_reference;
|
|
|
dd89bb |
uint32_t tag;
|
|
|
dd89bb |
} nt_file_reparse_point_information, nt_frpi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_network_open_information {
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
} nt_file_network_open_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_attribute_tag_information {
|
|
|
dd89bb |
uint32_t file_attr;
|
|
|
dd89bb |
uint32_t reparse_tag;
|
|
|
dd89bb |
} nt_file_attribute_tag_information, nt_ftagi;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_id_both_dir_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
uint32_t ea_size;
|
|
|
dd89bb |
char short_name_length;
|
|
|
dd89bb |
char reserved;
|
|
|
dd89bb |
wchar16_t short_name[12];
|
|
|
31887f |
wchar16_t pad;
|
|
|
dd89bb |
nt_large_integer file_id;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_id_both_dir_information, nt_fsdirent;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_id_full_dir_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
uint32_t ea_size;
|
|
|
dd89bb |
nt_large_integer FileId;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_id_full_dir_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_valid_data_length_information {
|
|
|
dd89bb |
nt_large_integer valid_data_length;
|
|
|
dd89bb |
} nt_file_valid_data_length_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_io_priority_hint_information {
|
|
|
dd89bb |
nt_io_priority_hint priority_hint;
|
|
|
dd89bb |
} nt_file_io_priority_hint_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_link_entry_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
int64_t parent_file_id;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_link_entry_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_links_information {
|
|
|
dd89bb |
uint32_t bytes_needed;
|
|
|
dd89bb |
uint32_t entries_returned;
|
|
|
dd89bb |
nt_file_link_entry_information entry;
|
|
|
dd89bb |
} nt_file_links_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_id_global_tx_dir_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t file_index;
|
|
|
dd89bb |
nt_large_integer creation_time;
|
|
|
dd89bb |
nt_large_integer last_access_time;
|
|
|
dd89bb |
nt_large_integer last_write_time;
|
|
|
dd89bb |
nt_large_integer change_time;
|
|
|
dd89bb |
nt_large_integer end_of_file;
|
|
|
dd89bb |
nt_large_integer allocation_size;
|
|
|
dd89bb |
uint32_t file_attributes;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
nt_large_integer file_id;
|
|
|
dd89bb |
nt_guid locking_transaction_id;
|
|
|
dd89bb |
uint32_t tx_info_flags;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_id_global_tx_dir_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_file_completion_information {
|
|
|
dd89bb |
void * port;
|
|
|
dd89bb |
void * key;
|
|
|
dd89bb |
} nt_file_completion_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file extended attributes */
|
|
|
dd89bb |
typedef struct _nt_file_get_ea_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
unsigned char ea_name_length;
|
|
|
dd89bb |
char ea_name[];
|
|
|
dd89bb |
} nt_file_get_ea_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* quota information */
|
|
|
dd89bb |
typedef struct _nt_file_get_quota_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t sid_length;
|
|
|
dd89bb |
nt_sid sid;
|
|
|
dd89bb |
} nt_file_get_quota_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file change notification */
|
|
|
dd89bb |
typedef struct _nt_file_notify_information {
|
|
|
dd89bb |
uint32_t next_entry_offset;
|
|
|
dd89bb |
uint32_t action;
|
|
|
dd89bb |
uint32_t file_name_length;
|
|
|
dd89bb |
wchar16_t file_name[];
|
|
|
dd89bb |
} nt_file_notify_information;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file segment element */
|
|
|
dd89bb |
typedef union _nt_file_segment_element {
|
|
|
dd89bb |
uint64_t * buffer;
|
|
|
dd89bb |
uint64_t alignment;
|
|
|
dd89bb |
} nt_file_segment_element;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* section object pointers */
|
|
|
dd89bb |
typedef struct _nt_section_object_pointers {
|
|
|
dd89bb |
void * data_section_object;
|
|
|
dd89bb |
void * shared_cache_map;
|
|
|
dd89bb |
void * image_section_object;
|
|
|
dd89bb |
} nt_section_object_pointers;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* reparse guid data buffer */
|
|
|
dd89bb |
typedef struct _nt_reparse_guid_data_buffer {
|
|
|
dd89bb |
uint32_t reparse_tag;
|
|
|
dd89bb |
uint16_t reparse_data_length;
|
|
|
dd89bb |
uint16_t reserved;
|
|
|
dd89bb |
nt_guid reparse_guid;
|
|
|
dd89bb |
unsigned char generic_reparse_buffer[];
|
|
|
dd89bb |
} nt_reparse_guid_data_buffer;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* reparse data buffer */
|
|
|
dd89bb |
typedef struct _nt_reparse_data_buffer {
|
|
|
dd89bb |
uint32_t reparse_tag;
|
|
|
dd89bb |
uint16_t reparse_data_length;
|
|
|
dd89bb |
uint16_t reserved;
|
|
|
dd89bb |
|
|
|
dd89bb |
union {
|
|
|
dd89bb |
struct {
|
|
|
dd89bb |
uint16_t substitute_name_offset;
|
|
|
dd89bb |
uint16_t substitute_name_length;
|
|
|
dd89bb |
uint16_t print_name_offset;
|
|
|
dd89bb |
uint16_t print_name_length;
|
|
|
dd89bb |
uint32_t flags;
|
|
|
dd89bb |
} symbolic_link_reparse_buffer;
|
|
|
dd89bb |
|
|
|
dd89bb |
struct {
|
|
|
dd89bb |
uint16_t substitute_name_offset;
|
|
|
dd89bb |
uint16_t substitute_name_length;
|
|
|
dd89bb |
uint16_t print_name_offset;
|
|
|
dd89bb |
uint16_t print_name_length;
|
|
|
dd89bb |
} mount_point_reparse_buffer;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
|
|
|
dd89bb |
wchar16_t path_buffer[];
|
|
|
dd89bb |
} nt_reparse_data_buffer;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file object */
|
|
|
dd89bb |
typedef struct _nt_file_object {
|
|
|
dd89bb |
int16_t type;
|
|
|
dd89bb |
int16_t size;
|
|
|
dd89bb |
nt_device_object * dev_obj;
|
|
|
dd89bb |
nt_vpb vpb;
|
|
|
dd89bb |
void * fs_context;
|
|
|
dd89bb |
void * fs_context_2nd;
|
|
|
dd89bb |
nt_section_object_pointers * sec_obj_ptr;
|
|
|
dd89bb |
void * private_cache_map;
|
|
|
dd89bb |
int32_t final_status;
|
|
|
dd89bb |
struct _nt_file_object * related_file_obj;
|
|
|
dd89bb |
unsigned char lock_operation;
|
|
|
dd89bb |
unsigned char delete_pending;
|
|
|
dd89bb |
unsigned char read_access;
|
|
|
dd89bb |
unsigned char write_access;
|
|
|
dd89bb |
unsigned char delete_access;
|
|
|
dd89bb |
unsigned char shared_read;
|
|
|
dd89bb |
unsigned char shared_write;
|
|
|
dd89bb |
unsigned char shared_delete;
|
|
|
dd89bb |
uint32_t flags;
|
|
|
dd89bb |
nt_unicode_string file_name;
|
|
|
dd89bb |
nt_large_integer current_byte_offset;
|
|
|
dd89bb |
uint32_t waiters;
|
|
|
dd89bb |
uint32_t busy;
|
|
|
dd89bb |
void * last_lock;
|
|
|
dd89bb |
nt_kevent lock;
|
|
|
dd89bb |
nt_kevent event;
|
|
|
dd89bb |
nt_io_completion_context * completion_context;
|
|
|
dd89bb |
uint32_t irp_list_lock;
|
|
|
dd89bb |
nt_list_entry irp_list;
|
|
|
dd89bb |
void * file_obj_ext;
|
|
|
dd89bb |
} nt_file_object;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* file-related function signatures */
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_create_file(
|
|
|
dd89bb |
__out void ** hfile,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in nt_large_integer * allocation_size __optional,
|
|
|
dd89bb |
__in uint32_t file_attr,
|
|
|
dd89bb |
__in uint32_t share_access,
|
|
|
dd89bb |
__in uint32_t create_disposition,
|
|
|
dd89bb |
__in uint32_t create_options,
|
|
|
dd89bb |
__in void * ea_buffer __optional,
|
|
|
dd89bb |
__in uint32_t ea_length);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_open_file(
|
|
|
dd89bb |
__out void ** hfile,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in uint32_t share_access,
|
|
|
dd89bb |
__in uint32_t open_options);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_delete_file(
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_flush_buffers_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_cancel_io_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_cancel_io_file_ex(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in nt_io_status_block * request_iosb __optional,
|
|
|
dd89bb |
__out nt_io_status_block * cancel_iosb);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_read_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__out void * buffer,
|
|
|
dd89bb |
__in uint32_t bytes_to_read,
|
|
|
dd89bb |
__in nt_large_integer * byte_offset __optional,
|
|
|
dd89bb |
__in uint32_t * key __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_write_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in void * buffer,
|
|
|
dd89bb |
__in uint32_t bytes_sent,
|
|
|
dd89bb |
__in nt_large_integer * byte_offset __optional,
|
|
|
dd89bb |
__in uint32_t * key __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_read_file_scatter(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in nt_file_segment_element * buffer,
|
|
|
dd89bb |
__in uint32_t bytes_to_read,
|
|
|
dd89bb |
__in nt_large_integer * byte_offset __optional,
|
|
|
dd89bb |
__in uint32_t * key __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_write_file_gather(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in nt_file_segment_element * buffer,
|
|
|
dd89bb |
__in uint32_t bytes_to_read,
|
|
|
dd89bb |
__in nt_large_integer * byte_offset __optional,
|
|
|
dd89bb |
__in uint32_t * key __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_lock_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in nt_large_integer * lock_offset,
|
|
|
dd89bb |
__in nt_large_integer * lock_length,
|
|
|
5d0788 |
__in uint32_t key,
|
|
|
dd89bb |
__in unsigned char fail_immediately,
|
|
|
dd89bb |
__in unsigned char exclusive_lock);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_unlock_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in nt_large_integer * lock_offset,
|
|
|
dd89bb |
__in nt_large_integer * lock_length,
|
|
|
5d0788 |
__in uint32_t key);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_device_io_control_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in uint32_t io_control_code,
|
|
|
dd89bb |
__in void * input_buffer __optional,
|
|
|
dd89bb |
__in uint32_t input_buffer_length,
|
|
|
dd89bb |
__out void * output_buffer __optional,
|
|
|
dd89bb |
__in uint32_t output_buffer_length);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_fs_control_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__in uint32_t fs_control_code,
|
|
|
dd89bb |
__in void * input_buffer __optional,
|
|
|
dd89bb |
__in uint32_t input_buffer_length,
|
|
|
dd89bb |
__out void * output_buffer __optional,
|
|
|
dd89bb |
__in uint32_t output_buffer_length);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_notify_change_directory_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__out nt_file_notify_information * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_length,
|
|
|
dd89bb |
__in uint32_t notify_filter,
|
|
|
dd89bb |
__in unsigned char watch_subtree);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_ea_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__out nt_file_full_ea_information * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_length,
|
|
|
dd89bb |
__in unsigned char return_single_entry,
|
|
|
dd89bb |
__in nt_file_get_ea_information * ea_list __optional,
|
|
|
dd89bb |
__in uint32_t ea_list_length,
|
|
|
dd89bb |
__in uint32_t * ea_index __optional,
|
|
|
dd89bb |
__in unsigned char restart_scan);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_set_ea_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in nt_file_full_ea_information * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_length);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_create_named_pipe_file(
|
|
|
dd89bb |
__out void ** hfile,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in uint32_t share_access,
|
|
|
dd89bb |
__in uint32_t create_disposition,
|
|
|
dd89bb |
__in uint32_t create_options,
|
|
|
dd89bb |
__in uint32_t type_message,
|
|
|
dd89bb |
__in uint32_t readmode_message,
|
|
|
dd89bb |
__in uint32_t non_blocking,
|
|
|
dd89bb |
__in uint32_t max_instances,
|
|
|
dd89bb |
__in size_t in_buffer_size,
|
|
|
dd89bb |
__in size_t out_buffer_size,
|
|
|
dd89bb |
__in nt_large_integer * default_timeout __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_create_mailslot_file(
|
|
|
dd89bb |
__out void ** hfile,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in uint32_t create_options,
|
|
|
dd89bb |
__in uint32_t in_buffer_size,
|
|
|
dd89bb |
__in uint32_t max_message_size,
|
|
|
dd89bb |
__in nt_large_integer * read_timeout __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_volume_information_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__out void * vol_info,
|
|
|
dd89bb |
__in uint32_t vol_info_length,
|
|
|
dd89bb |
__in nt_fs_info_class vol_info_class);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_set_volume_information_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in void * vol_info,
|
|
|
dd89bb |
__in uint32_t vol_info_length,
|
|
|
dd89bb |
__in nt_fs_info_class vol_info_class);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_quota_information_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__out nt_file_user_quota_information * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_length,
|
|
|
dd89bb |
__in unsigned char returning_single_entry,
|
|
|
dd89bb |
__in nt_file_quota_list_information * sid_list __optional,
|
|
|
dd89bb |
__in uint32_t sid_list_length,
|
|
|
dd89bb |
__in nt_sid * start_sid __optional,
|
|
|
dd89bb |
__in unsigned char restart_scan);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_set_quota_information_file(
|
|
|
dd89bb |
__in void * hfile ,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in nt_file_user_quota_information * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_length);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_attributes_file(
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_file_basic_information * file_info);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_full_attributes_file(
|
|
|
dd89bb |
__in nt_object_attributes * obj_attr,
|
|
|
dd89bb |
__out nt_file_network_open_information * file_info);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_directory_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__in void * hevent __optional,
|
|
|
dd89bb |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
dd89bb |
__in void * apc_context __optional,
|
|
|
4e35a4 |
__out nt_iosb volatile * io_status_block,
|
|
|
dd89bb |
__out void * file_info,
|
|
|
dd89bb |
__in uint32_t file_info_length,
|
|
|
dd89bb |
__in nt_file_info_class file_info_class,
|
|
|
dd89bb |
__in unsigned char return_single_entry,
|
|
|
dd89bb |
__in nt_unicode_string * file_name __optional,
|
|
|
dd89bb |
__in unsigned char restart_scan);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_query_information_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__out void * file_info,
|
|
|
dd89bb |
__in uint32_t file_info_length,
|
|
|
dd89bb |
__in nt_file_info_class file_info_class);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_zw_set_information_file(
|
|
|
dd89bb |
__in void * hfile,
|
|
|
dd89bb |
__out nt_io_status_block * io_status_block,
|
|
|
dd89bb |
__in void * file_info,
|
|
|
dd89bb |
__in uint32_t file_info_length,
|
|
|
dd89bb |
__in nt_file_info_class file_info_class);
|
|
|
dd89bb |
|
|
|
dd89bb |
/* extension functions */
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_tt_get_file_handle_type(
|
|
|
dd89bb |
__in void * handle,
|
|
|
dd89bb |
__out int32_t * type);
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_tt_open_logical_parent_directory(
|
|
|
dd89bb |
__out void ** hparent,
|
|
|
dd89bb |
__in void * hdir,
|
|
|
dd89bb |
__out uintptr_t * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_size,
|
|
|
50eb16 |
__in uint32_t oattr,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
50eb16 |
__in uint32_t share_access,
|
|
|
4d8da7 |
__in uint32_t open_options,
|
|
|
4d8da7 |
__out int * reserved);
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __stdcall ntapi_tt_open_physical_parent_directory(
|
|
|
dd89bb |
__out void ** hparent,
|
|
|
dd89bb |
__in void * hdir,
|
|
|
baceb0 |
__out void * buffer,
|
|
|
dd89bb |
__in uint32_t buffer_size,
|
|
|
a75a96 |
__in uint32_t oattr,
|
|
|
dd89bb |
__in uint32_t desired_access,
|
|
|
a75a96 |
__in uint32_t share_access,
|
|
|
4d8da7 |
__in uint32_t open_options,
|
|
|
4d8da7 |
__out int * reserved);
|
|
|
dd89bb |
|
|
|
0e25b0 |
typedef int32_t __stdcall ntapi_tt_open_volume_by_guid(
|
|
|
0e25b0 |
__out void ** hfile,
|
|
|
0e25b0 |
__in const nt_guid * guid,
|
|
|
0e25b0 |
__in uint32_t desired_access,
|
|
|
0e25b0 |
__in nt_object_attributes * obj_attr,
|
|
|
0e25b0 |
__out nt_io_status_block * io_status_block,
|
|
|
0e25b0 |
__in uint32_t share_access,
|
|
|
0e25b0 |
__in uint32_t open_options);
|
|
|
0e25b0 |
|
|
|
dd89bb |
#endif
|