|
|
@ -52,6 +52,18 @@ |
|
|
|
# define NT_SUCCESS(status) (((NTSTATUS) (status)) >= 0) |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifndef NT_INFORMATION |
|
|
|
# define NT_INFORMATION(status) ((((ULONG) (status)) >> 30) == 1) |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifndef NT_WARNING |
|
|
|
# define NT_WARNING(status) ((((ULONG) (status)) >> 30) == 2) |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifndef NT_ERROR |
|
|
|
# define NT_ERROR(status) ((((ULONG) (status)) >> 30) == 3) |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifndef STATUS_SUCCESS |
|
|
|
# define STATUS_SUCCESS ((NTSTATUS) 0x00000000L) |
|
|
|
#endif |
|
|
@ -4130,42 +4142,6 @@ typedef struct _IO_STATUS_BLOCK { |
|
|
|
ULONG_PTR Information; |
|
|
|
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; |
|
|
|
|
|
|
|
typedef struct _FILE_PIPE_LOCAL_INFORMATION { |
|
|
|
ULONG NamedPipeType; |
|
|
|
ULONG NamedPipeConfiguration; |
|
|
|
ULONG MaximumInstances; |
|
|
|
ULONG CurrentInstances; |
|
|
|
ULONG InboundQuota; |
|
|
|
ULONG ReadDataAvailable; |
|
|
|
ULONG OutboundQuota; |
|
|
|
ULONG WriteQuotaAvailable; |
|
|
|
ULONG NamedPipeState; |
|
|
|
ULONG NamedPipeEnd; |
|
|
|
} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_BASIC_INFORMATION { |
|
|
|
LARGE_INTEGER CreationTime; |
|
|
|
LARGE_INTEGER LastAccessTime; |
|
|
|
LARGE_INTEGER LastWriteTime; |
|
|
|
LARGE_INTEGER ChangeTime; |
|
|
|
DWORD FileAttributes; |
|
|
|
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_DISPOSITION_INFORMATION { |
|
|
|
BOOLEAN DeleteFile; |
|
|
|
} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_MODE_INFORMATION { |
|
|
|
ULONG Mode; |
|
|
|
} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_END_OF_FILE_INFORMATION { |
|
|
|
LARGE_INTEGER EndOfFile; |
|
|
|
} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; |
|
|
|
|
|
|
|
#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 |
|
|
|
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 |
|
|
|
|
|
|
|
typedef enum _FILE_INFORMATION_CLASS { |
|
|
|
FileDirectoryInformation = 1, |
|
|
|
FileFullDirectoryInformation, |
|
|
@ -4225,6 +4201,175 @@ typedef enum _FILE_INFORMATION_CLASS { |
|
|
|
FileMaximumInformation |
|
|
|
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; |
|
|
|
|
|
|
|
typedef struct _FILE_BASIC_INFORMATION { |
|
|
|
LARGE_INTEGER CreationTime; |
|
|
|
LARGE_INTEGER LastAccessTime; |
|
|
|
LARGE_INTEGER LastWriteTime; |
|
|
|
LARGE_INTEGER ChangeTime; |
|
|
|
DWORD FileAttributes; |
|
|
|
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_STANDARD_INFORMATION { |
|
|
|
LARGE_INTEGER AllocationSize; |
|
|
|
LARGE_INTEGER EndOfFile; |
|
|
|
ULONG NumberOfLinks; |
|
|
|
BOOLEAN DeletePending; |
|
|
|
BOOLEAN Directory; |
|
|
|
} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_INTERNAL_INFORMATION { |
|
|
|
LARGE_INTEGER IndexNumber; |
|
|
|
} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_EA_INFORMATION { |
|
|
|
ULONG EaSize; |
|
|
|
} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_ACCESS_INFORMATION { |
|
|
|
ACCESS_MASK AccessFlags; |
|
|
|
} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_POSITION_INFORMATION { |
|
|
|
LARGE_INTEGER CurrentByteOffset; |
|
|
|
} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_MODE_INFORMATION { |
|
|
|
ULONG Mode; |
|
|
|
} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_ALIGNMENT_INFORMATION { |
|
|
|
ULONG AlignmentRequirement; |
|
|
|
} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_NAME_INFORMATION { |
|
|
|
ULONG FileNameLength; |
|
|
|
WCHAR FileName[1]; |
|
|
|
} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_END_OF_FILE_INFORMATION { |
|
|
|
LARGE_INTEGER EndOfFile; |
|
|
|
} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_ALL_INFORMATION { |
|
|
|
FILE_BASIC_INFORMATION BasicInformation; |
|
|
|
FILE_STANDARD_INFORMATION StandardInformation; |
|
|
|
FILE_INTERNAL_INFORMATION InternalInformation; |
|
|
|
FILE_EA_INFORMATION EaInformation; |
|
|
|
FILE_ACCESS_INFORMATION AccessInformation; |
|
|
|
FILE_POSITION_INFORMATION PositionInformation; |
|
|
|
FILE_MODE_INFORMATION ModeInformation; |
|
|
|
FILE_ALIGNMENT_INFORMATION AlignmentInformation; |
|
|
|
FILE_NAME_INFORMATION NameInformation; |
|
|
|
} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_DISPOSITION_INFORMATION { |
|
|
|
BOOLEAN DeleteFile; |
|
|
|
} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_PIPE_LOCAL_INFORMATION { |
|
|
|
ULONG NamedPipeType; |
|
|
|
ULONG NamedPipeConfiguration; |
|
|
|
ULONG MaximumInstances; |
|
|
|
ULONG CurrentInstances; |
|
|
|
ULONG InboundQuota; |
|
|
|
ULONG ReadDataAvailable; |
|
|
|
ULONG OutboundQuota; |
|
|
|
ULONG WriteQuotaAvailable; |
|
|
|
ULONG NamedPipeState; |
|
|
|
ULONG NamedPipeEnd; |
|
|
|
} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; |
|
|
|
|
|
|
|
#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 |
|
|
|
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 |
|
|
|
|
|
|
|
typedef enum _FS_INFORMATION_CLASS { |
|
|
|
FileFsVolumeInformation = 1, |
|
|
|
FileFsLabelInformation = 2, |
|
|
|
FileFsSizeInformation = 3, |
|
|
|
FileFsDeviceInformation = 4, |
|
|
|
FileFsAttributeInformation = 5, |
|
|
|
FileFsControlInformation = 6, |
|
|
|
FileFsFullSizeInformation = 7, |
|
|
|
FileFsObjectIdInformation = 8, |
|
|
|
FileFsDriverPathInformation = 9, |
|
|
|
FileFsVolumeFlagsInformation = 10, |
|
|
|
FileFsSectorSizeInformation = 11 |
|
|
|
} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_VOLUME_INFORMATION { |
|
|
|
LARGE_INTEGER VolumeCreationTime; |
|
|
|
ULONG VolumeSerialNumber; |
|
|
|
ULONG VolumeLabelLength; |
|
|
|
BOOLEAN SupportsObjects; |
|
|
|
WCHAR VolumeLabel[1]; |
|
|
|
} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_LABEL_INFORMATION { |
|
|
|
ULONG VolumeLabelLength; |
|
|
|
WCHAR VolumeLabel[1]; |
|
|
|
} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_SIZE_INFORMATION { |
|
|
|
LARGE_INTEGER TotalAllocationUnits; |
|
|
|
LARGE_INTEGER AvailableAllocationUnits; |
|
|
|
ULONG SectorsPerAllocationUnit; |
|
|
|
ULONG BytesPerSector; |
|
|
|
} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_DEVICE_INFORMATION { |
|
|
|
DEVICE_TYPE DeviceType; |
|
|
|
ULONG Characteristics; |
|
|
|
} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_ATTRIBUTE_INFORMATION { |
|
|
|
ULONG FileSystemAttributes; |
|
|
|
LONG MaximumComponentNameLength; |
|
|
|
ULONG FileSystemNameLength; |
|
|
|
WCHAR FileSystemName[1]; |
|
|
|
} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_CONTROL_INFORMATION { |
|
|
|
LARGE_INTEGER FreeSpaceStartFiltering; |
|
|
|
LARGE_INTEGER FreeSpaceThreshold; |
|
|
|
LARGE_INTEGER FreeSpaceStopFiltering; |
|
|
|
LARGE_INTEGER DefaultQuotaThreshold; |
|
|
|
LARGE_INTEGER DefaultQuotaLimit; |
|
|
|
ULONG FileSystemControlFlags; |
|
|
|
} FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_FULL_SIZE_INFORMATION { |
|
|
|
LARGE_INTEGER TotalAllocationUnits; |
|
|
|
LARGE_INTEGER CallerAvailableAllocationUnits; |
|
|
|
LARGE_INTEGER ActualAvailableAllocationUnits; |
|
|
|
ULONG SectorsPerAllocationUnit; |
|
|
|
ULONG BytesPerSector; |
|
|
|
} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_OBJECTID_INFORMATION { |
|
|
|
UCHAR ObjectId[16]; |
|
|
|
UCHAR ExtendedInfo[48]; |
|
|
|
} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_DRIVER_PATH_INFORMATION { |
|
|
|
BOOLEAN DriverInPath; |
|
|
|
ULONG DriverNameLength; |
|
|
|
WCHAR DriverName[1]; |
|
|
|
} FILE_FS_DRIVER_PATH_INFORMATION, *PFILE_FS_DRIVER_PATH_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_VOLUME_FLAGS_INFORMATION { |
|
|
|
ULONG Flags; |
|
|
|
} FILE_FS_VOLUME_FLAGS_INFORMATION, *PFILE_FS_VOLUME_FLAGS_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION { |
|
|
|
ULONG LogicalBytesPerSector; |
|
|
|
ULONG PhysicalBytesPerSectorForAtomicity; |
|
|
|
ULONG PhysicalBytesPerSectorForPerformance; |
|
|
|
ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity; |
|
|
|
ULONG Flags; |
|
|
|
ULONG ByteOffsetForSectorAlignment; |
|
|
|
ULONG ByteOffsetForPartitionAlignment; |
|
|
|
} FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION; |
|
|
|
|
|
|
|
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { |
|
|
|
LARGE_INTEGER IdleTime; |
|
|
|
LARGE_INTEGER KernelTime; |
|
|
@ -4354,6 +4499,13 @@ typedef NTSTATUS (NTAPI *sNtSetInformationFile) |
|
|
|
ULONG Length, |
|
|
|
FILE_INFORMATION_CLASS FileInformationClass); |
|
|
|
|
|
|
|
typedef NTSTATUS (NTAPI *sNtQueryVolumeInformationFile) |
|
|
|
(HANDLE FileHandle, |
|
|
|
PIO_STATUS_BLOCK IoStatusBlock, |
|
|
|
PVOID FsInformation, |
|
|
|
ULONG Length, |
|
|
|
FS_INFORMATION_CLASS FsInformationClass); |
|
|
|
|
|
|
|
typedef NTSTATUS (NTAPI *sNtQuerySystemInformation) |
|
|
|
(UINT SystemInformationClass, |
|
|
|
PVOID SystemInformation, |
|
|
@ -4471,6 +4623,7 @@ extern sRtlNtStatusToDosError pRtlNtStatusToDosError; |
|
|
|
extern sNtDeviceIoControlFile pNtDeviceIoControlFile; |
|
|
|
extern sNtQueryInformationFile pNtQueryInformationFile; |
|
|
|
extern sNtSetInformationFile pNtSetInformationFile; |
|
|
|
extern sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile; |
|
|
|
extern sNtQuerySystemInformation pNtQuerySystemInformation; |
|
|
|
|
|
|
|
|
|
|
|