mirror of
https://github.com/sal063/AC6_recomp
synced 2026-09-09 12:24:03 -04:00
66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
#pragma once
|
|
/**
|
|
* ReXGlue runtime - AC6 Recompilation project
|
|
* Copyright (c) 2026 Tom Clay. All rights reserved.
|
|
*/
|
|
|
|
#include <rex/system/xtypes.h>
|
|
|
|
namespace rex {
|
|
namespace system {
|
|
|
|
enum X_FILE_FS_INFORMATION_CLASS {
|
|
XFileFsVolumeInformation = 1,
|
|
XFileFsSizeInformation = 3,
|
|
XFileFsDeviceInformation,
|
|
XFileFsAttributeInformation = 5,
|
|
};
|
|
|
|
enum X_FILE_DEVICE_TYPE : uint32_t {
|
|
FILE_DEVICE_UNKNOWN = 0x00000022,
|
|
FILE_DEVICE_EHSTOR = 0x00000046,
|
|
};
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
// https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-_file_fs_volume_information
|
|
struct X_FILE_FS_VOLUME_INFORMATION {
|
|
be<uint64_t> creation_time;
|
|
be<uint32_t> serial_number;
|
|
be<uint32_t> label_length;
|
|
uint8_t supports_objects;
|
|
char label[1];
|
|
uint8_t pad[6];
|
|
};
|
|
static_assert_size(X_FILE_FS_VOLUME_INFORMATION, 24);
|
|
|
|
// https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-_file_fs_size_information
|
|
struct X_FILE_FS_SIZE_INFORMATION {
|
|
be<uint64_t> total_allocation_units;
|
|
be<uint64_t> available_allocation_units;
|
|
be<uint32_t> sectors_per_allocation_unit;
|
|
be<uint32_t> bytes_per_sector;
|
|
};
|
|
static_assert_size(X_FILE_FS_SIZE_INFORMATION, 24);
|
|
|
|
// https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_fs_attribute_information
|
|
struct X_FILE_FS_ATTRIBUTE_INFORMATION {
|
|
be<uint32_t> attributes;
|
|
be<int32_t> component_name_max_length;
|
|
be<uint32_t> name_length;
|
|
char name[1];
|
|
uint8_t pad[3];
|
|
};
|
|
static_assert_size(X_FILE_FS_ATTRIBUTE_INFORMATION, 16);
|
|
|
|
struct X_FILE_FS_DEVICE_INFORMATION {
|
|
be<X_FILE_DEVICE_TYPE> device_type;
|
|
be<uint32_t> characteristics;
|
|
};
|
|
static_assert_size(X_FILE_FS_DEVICE_INFORMATION, 8);
|
|
|
|
#pragma pack(pop)
|
|
|
|
} // namespace system
|
|
} // namespace rex
|