1#ifndef _EXT2_COMMON_INCLUDE_
2#define _EXT2_COMMON_INCLUDE_
5#define IOCTL_APP_VOLUME_PROPERTY \
6CTL_CODE(FILE_DEVICE_UNKNOWN, 2000, METHOD_BUFFERED, FILE_ANY_ACCESS)
8#define IOCTL_APP_QUERY_PERFSTAT \
9CTL_CODE(FILE_DEVICE_UNKNOWN, 2001, METHOD_BUFFERED, FILE_ANY_ACCESS)
11#define IOCTL_APP_MOUNT_POINT \
12CTL_CODE(FILE_DEVICE_UNKNOWN, 2002, METHOD_BUFFERED, FILE_ANY_ACCESS)
16#define PS_IRP_CONTEXT 0x00
22#define PS_RW_CONTEXT 0x06
24#define PS_FILE_NAME 0x08
25#define PS_MCB_NAME 0x09
26#define PS_INODE_NAME 0x0A
27#define PS_DIR_ENTRY 0x0B
28#define PS_DIR_PATTERN 0x0C
29#define PS_DISK_EVENT 0x0D
30#define PS_DISK_BUFFER 0x0E
31#define PS_BLOCK_DATA 0x0F
33#define PS_EXT2_INODE 0x10
35#define PS_BUFF_HEAD 0x12
37#define PS_MAX_TYPE_V1 (0x10)
38#define PS_MAX_TYPE_V2 (0x30)
115#define EXT2_PERF_STAT_MAGIC '2SPE'
116#define EXT2_PERF_STAT_VER2 2
146#define EXT2_VOLUME_PROPERTY_MAGIC 'EVPM'
148#define EXT2_FLAG_VP_SET_GLOBAL 0x00000001
150#define APP_CMD_QUERY_VERSION 0x00000000
151#define APP_CMD_QUERY_CODEPAGES 0x00000001
152#define APP_CMD_QUERY_PROPERTY 0x00000002
153#define APP_CMD_SET_PROPERTY 0x00000003
154#define APP_CMD_QUERY_PROPERTY2 0x00000004
155#define APP_CMD_SET_PROPERTY2 0x00000005
156#define APP_CMD_QUERY_PROPERTY3 0x00000006
157#define APP_CMD_SET_PROPERTY3 0x00000007
159#define CODEPAGE_MAXLEN 0x20
160#define HIDINGPAT_LEN 0x20
200#define EXT2_VPROP3_AUTOMOUNT (1ULL << 0)
201#define EXT2_VPROP3_USERIDS (1ULL << 1)
203#define EXT2_VPROP3_AUTOMOUNT (1ui64 << 0)
204#define EXT2_VPROP3_USERIDS (1ui64 << 1)
235#define EXT2_QUERY_PERFSTAT_MAGIC 'EVPM'
236#define EXT2_QUERY_PERFSTAT_VER2 0x8000000
248#define EXT2_QUERY_PERFSTAT_SZV1 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V1))
249#define EXT2_QUERY_PERFSTAT_SZV2 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V2))
252#define EXT2_APP_MOUNTPOINT_MAGIC 'EAMM'
262#define APP_CMD_ADD_DOS_SYMLINK 0x00000001
263#define APP_CMD_DEL_DOS_SYMLINK 0x00000002
struct _EXT2_MOUNT_POINT * PEXT2_MOUNT_POINT
struct _EXT2_PERF_STATISTICS_V1 * PEXT2_PERF_STATISTICS_V1
struct _EXT2_VOLUME_PROPERTY EXT2_VOLUME_PROPERTY
struct _EXT2_QUERY_PERFSTAT * PEXT2_QUERY_PERFSTAT
struct _EXT2_PERF_STATISTICS_V2 * PEXT2_PERF_STATISTICS_V2
struct _EXT2_PERF_STATISTICS_V2 EXT2_PERF_STATISTICS_V2
struct _EXT2_VOLUME_PROPERTY * PEXT2_VOLUME_PROPERTY
struct _EXT2_VOLUME_PROPERTY3 EXT2_VOLUME_PROPERTY3
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
struct _EXT2_VOLUME_PROPERTY2 * PEXT2_VOLUME_PROPERTY2
struct _EXT2_QUERY_PERFSTAT EXT2_QUERY_PERFSTAT
struct _EXT2_VOLUME_PROPERTY_VERSION EXT2_VOLUME_PROPERTY_VERSION
struct _EXT2_VOLUME_PROPERTY3 * PEXT2_VOLUME_PROPERTY3
struct _EXT2_MOUNT_POINT EXT2_MOUNT_POINT
struct _EXT2_PERF_STATISTICS_V1 EXT2_PERF_STATISTICS_V1
struct _EXT2_VOLUME_PROPERTY2 EXT2_VOLUME_PROPERTY2
static PLARGE_INTEGER Time
struct _EXT2_PERF_STATISTICS_V1::@693 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_STAT_ARRAY_V1 Current
EXT2_STAT_ARRAY_V2 Current
struct _EXT2_PERF_STATISTICS_V2::@694 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_PERF_STATISTICS_V2 PerfStatV2
EXT2_PERF_STATISTICS_V1 PerfStatV1
CHAR sHidingSuffix[HIDINGPAT_LEN]
CHAR sHidingPrefix[HIDINGPAT_LEN]
CHAR Codepage[CODEPAGE_MAXLEN]
static int Link(const char **args)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
#define IRP_MJ_MAXIMUM_FUNCTION