-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsilo.h
More file actions
141 lines (134 loc) · 3.59 KB
/
silo.h
File metadata and controls
141 lines (134 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#pragma once
#if Q_NT_VERSION >= Q_NT_WIN10
_Q_NT_BIT_TEMPLATE struct SILOOBJECT_BASIC_INFORMATION
{
#if Q_NT_VERSION == Q_NT_WIN10
private:
_Q_NT_BIT_TYPE
public:
BitnessType_t<std::uintptr_t> SiloId; // 0x00
BitnessType_t<std::uintptr_t> SiloParentId; // 0x04 / 0x08
#elif Q_NT_VERSION == Q_NT_WIN10_TH2
GUID SiloId; // 0x00
GUID SiloParentId; // 0x10
#else
std::uint32_t SiloId; // 0x00
std::uint32_t SiloParentId; // 0x04
#endif
std::uint32_t NumberOfProcesses; // 0x08 / 0x10
#if Q_NT_VERSION <= Q_NT_WIN10_TH2
std::uint32_t NumberOfChildSilos; // 0x0C / 0x14
#endif
bool IsInServerSilo; // 0x0C
std::uint8_t Reserved[3]; // 0x0D
};
_Q_NT_BIT_ASSERT(SILOOBJECT_BASIC_INFORMATION, 0x10, 0x10);
_Q_NT_BIT_TEMPLATE struct SILOOBJECT_ROOT_DIRECTORY
{
#if Q_NT_VERSION >= Q_NT_WIN10_RS1
union
{
std::uint32_t ControlFlags;
UNICODE_STRING<nBitness> Path;
};
#else
private:
_Q_NT_BIT_TYPE
public:
BitnessType_t<HANDLE> DirectoryHandle;
#endif
};
_Q_NT_BIT_ASSERT(SILOOBJECT_ROOT_DIRECTORY, 0x8, 0x10);
using SERVERSILO_STATE = enum _SERVERSILO_STATE
{
SERVERSILO_INITING,
SERVERSILO_STARTED,
#if Q_NT_VERSION >= Q_NT_WIN10_TH2
SERVERSILO_SHUTTING_DOWN,
#endif
SERVERSILO_TERMINATING,
SERVERSILO_TERMINATED
};
_Q_NT_BIT_TEMPLATE struct SERVERSILO_BASIC_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
#if Q_NT_VERSION == Q_NT_WIN10
BitnessType_t<std::uintptr_t> SiloIdNumber; // 0x00
#endif
std::uint32_t ServiceSessionId; // 0x00
#if Q_NT_VERSION == Q_NT_WIN10
std::uint32_t DefaultCompartmentId; // 0x08
#endif
SERVERSILO_STATE State; // 0x04
#if Q_NT_VERSION >= Q_NT_WIN10_TH2
NTSTATUS ExitStatus; // 0x08
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_20H1
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
std::uint8_t Reserved; // 0x0C
#else
bool IsDownlevelContainer; // 0x0C
#endif
BitnessType_t<void*> ApiSetSchema; // 0x10
BitnessType_t<void*> HostApiSetSchema; // 0x14 / 0x18
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
std::uint32_t ContainerBuildNumber; // 0x18 / 0x20
std::uint32_t HostBuildNumber; // 0x1C / 0x24
#endif
};
_Q_NT_BIT_ASSERT(SERVERSILO_BASIC_INFORMATION, 0x20, 0x28);
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS1
struct SILO_USER_SHARED_DATA
{
std::uint32_t ServiceSessionId; // 0x0000
std::uint32_t ActiveConsoleId; // 0x0004
std::int64_t ConsoleSessionForegroundProcessId; // 0x0008
NT_PRODUCT_TYPE NtProductType; // 0x0010
std::uint32_t SuiteMask; // 0x0014
#if Q_NT_VERSION >= Q_NT_WIN10_RS2
std::uint32_t SharedUserSessionId; // 0x0018
#endif
bool IsMultiSessionSku; // 0x001C
#if Q_NT_VERSION >= Q_NT_WIN10_RS2
bool IsStateSeparationEnabled; // 0x001D
wchar_t NtSystemRoot[MAX_PATH]; // 0x001E
std::uint16_t UserModeGlobalLogger[16]; // 0x0226
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_21H1
std::uint32_t TimeZoneId; // 0x0248
volatile long TimeZoneBiasStamp; // 0x024C
KSYSTEM_TIME TimeZoneBias; // 0x0250
LARGE_INTEGER TimeZoneBiasEffectiveStart; // 0x0260
LARGE_INTEGER TimeZoneBiasEffectiveEnd; // 0x0268
#endif
};
static_assert(sizeof(SILO_USER_SHARED_DATA) == 0x270);
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_20H1
_Q_NT_BIT_TEMPLATE struct SERVERSILO_INIT_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
BitnessType_t<void*> DeleteEvent; // 0x0
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
std::uint32_t ContainerBuildNumber; // 0x4 / 0x8
#else
std::uint8_t IsDownlevelContainer; // 0x4 / 0x8
#endif
};
_Q_NT_BIT_ASSERT(SERVERSILO_INIT_INFORMATION, 0x8, 0x10);
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
struct SERVERSILO_DIAGNOSTIC_INFORMATION
{
GUID ReportId; // 0x00
NTSTATUS ExitStatus; // 0x10
wchar_t CriticalProcessName[15]; // 0x14
};
static_assert(sizeof(SERVERSILO_DIAGNOSTIC_INFORMATION) == 0x34);
#endif