Advertisement
Guest User

ProcessHacker diff

a guest
Jul 22nd, 2021
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 136.32 KB | None | 0 0
  1. diff --git a/ProcessHacker/tokprp.c b/ProcessHacker/tokprp.c
  2. index 12323183..85f7f0cb 100644
  3. --- a/ProcessHacker/tokprp.c
  4. +++ b/ProcessHacker/tokprp.c
  5. @@ -3,7 +3,7 @@
  6.   *   token properties
  7.   *
  8.   * Copyright (C) 2010-2012 wj32
  9. - * Copyright (C) 2017-2019 dmex
  10. + * Copyright (C) 2017-2021 dmex
  11.   *
  12.   * This file is part of Process Hacker.
  13.   *
  14. @@ -496,6 +496,18 @@ static NTSTATUS NTAPI PhpTokenGroupResolveWorker(
  15.          {
  16.              PhMoveReference(&sidString, PhConcatStringRefZ(&sidString->sr, L" (APP_CAPABILITY)"));
  17.          }
  18. +        else
  19. +        {
  20. +            ULONG subAuthority;
  21. +
  22. +            subAuthority = *RtlSubAuthoritySid(context->TokenGroupSid, 0);
  23. +            //RtlIdentifierAuthoritySid(tokenUser->User.Sid) == (BYTE[])SECURITY_NT_AUTHORITY
  24. +
  25. +            if (subAuthority == SECURITY_UMFD_BASE_RID)
  26. +            {
  27. +                PhMoveReference(&sidString, PhCreateString(L"Font Driver Host\\UMFD"));
  28. +            }
  29. +        }
  30.  
  31.          if (sidString)
  32.          {
  33. @@ -3273,10 +3285,26 @@ PPH_STRING PhpGetTokenFolderPath(
  34.  
  35.      if (NT_SUCCESS(PhGetTokenUser(TokenHandle, &tokenUser)))
  36.      {
  37. -        if (tokenUserSid = PhSidToStringSid(tokenUser->User.Sid))
  38. +        ULONG subAuthority;
  39. +
  40. +        subAuthority = *RtlSubAuthoritySid(tokenUser->User.Sid, 0);
  41. +        //RtlIdentifierAuthoritySid(tokenUser->User.Sid) == (BYTE[])SECURITY_NT_AUTHORITY
  42. +
  43. +        if (subAuthority == SECURITY_UMFD_BASE_RID)
  44. +        {
  45. +            if (tokenUserSid = PhSidToStringSid(&PhSeLocalSystemSid))
  46. +            {
  47. +                profileKeyPath = PhConcatStringRef2(&servicesKeyName, &tokenUserSid->sr);
  48. +                PhDereferenceObject(tokenUserSid);
  49. +            }
  50. +        }
  51. +        else
  52.          {
  53. -            profileKeyPath = PhConcatStringRef2(&servicesKeyName, &tokenUserSid->sr);
  54. -            PhDereferenceObject(tokenUserSid);
  55. +            if (tokenUserSid = PhSidToStringSid(tokenUser->User.Sid))
  56. +            {
  57. +                profileKeyPath = PhConcatStringRef2(&servicesKeyName, &tokenUserSid->sr);
  58. +                PhDereferenceObject(tokenUserSid);
  59. +            }
  60.          }
  61.  
  62.          PhFree(tokenUser);
  63. @@ -3363,6 +3391,7 @@ PPH_STRING PhpGetTokenRegistryPath(
  64.  }
  65.  
  66.  PPH_STRING PhpGetTokenAppContainerFolderPath(
  67. +    _In_ HANDLE TokenHandle,
  68.      _In_ PSID TokenAppContainerSid
  69.      )
  70.  {
  71. @@ -3372,17 +3401,61 @@ PPH_STRING PhpGetTokenAppContainerFolderPath(
  72.  
  73.      appContainerSid = PhSidToStringSid(TokenAppContainerSid);
  74.  
  75. -    if (GetAppContainerFolderPath_Import())
  76. +    if (NT_SUCCESS(PhImpersonateToken(NtCurrentThread(), TokenHandle)))
  77.      {
  78. -        if (SUCCEEDED(GetAppContainerFolderPath_Import()(appContainerSid->Buffer, &folderPath)) && folderPath)
  79. +        if (GetAppContainerFolderPath_Import())
  80.          {
  81. -            appContainerFolderPath = PhCreateString(folderPath);
  82. -            CoTaskMemFree(folderPath);
  83. +            if (SUCCEEDED(GetAppContainerFolderPath_Import()(appContainerSid->Buffer, &folderPath)) && folderPath)
  84. +            {
  85. +                appContainerFolderPath = PhCreateString(folderPath);
  86. +                CoTaskMemFree(folderPath);
  87. +            }
  88.          }
  89. +
  90. +        PhRevertImpersonationToken(NtCurrentThread());
  91.      }
  92.  
  93.      PhDereferenceObject(appContainerSid);
  94.  
  95. +    // Workaround for psuedo Appcontainers created by System processes that default to the \systemprofile path. (dmex)
  96. +    if (PhIsNullOrEmptyString(appContainerFolderPath))
  97. +    {
  98. +        PTOKEN_USER tokenUser;
  99. +
  100. +        if (NT_SUCCESS(PhGetTokenUser(TokenHandle, &tokenUser)))
  101. +        {
  102. +            ULONG subAuthority;
  103. +            PPH_STRING tokenProfilePathString;
  104. +            PPH_STRING appContainerName;
  105. +
  106. +            subAuthority = *RtlSubAuthoritySid(tokenUser->User.Sid, 0);
  107. +            //RtlIdentifierAuthoritySid(tokenUser->User.Sid) == (BYTE[])SECURITY_NT_AUTHORITY
  108. +
  109. +            if (subAuthority == SECURITY_UMFD_BASE_RID)
  110. +            {
  111. +                if (tokenProfilePathString = PhpGetTokenFolderPath(TokenHandle))
  112. +                {
  113. +                    if (appContainerName = PhGetAppContainerName(TokenAppContainerSid))
  114. +                    {
  115. +                        static PH_STRINGREF appDataPackagePath = PH_STRINGREF_INIT(L"\\AppData\\Local\\Packages\\");
  116. +
  117. +                        PhMoveReference(&appContainerFolderPath, PhConcatStringRef3(
  118. +                            &tokenProfilePathString->sr,
  119. +                            &appDataPackagePath,
  120. +                            &appContainerName->sr
  121. +                            ));
  122. +
  123. +                        PhDereferenceObject(appContainerName);
  124. +                    }
  125. +
  126. +                    PhDereferenceObject(tokenProfilePathString);
  127. +                }
  128. +            }
  129. +
  130. +            PhFree(tokenUser);
  131. +        }
  132. +    }
  133. +
  134.      return appContainerFolderPath;
  135.  }
  136.  
  137. @@ -3641,7 +3714,7 @@ INT_PTR CALLBACK PhpTokenContainerPageProc(
  138.                  {
  139.                      if (appContainerInfo->TokenAppContainer)
  140.                      {
  141. -                        appContainerFolderPath = PhpGetTokenAppContainerFolderPath(appContainerInfo->TokenAppContainer);
  142. +                        appContainerFolderPath = PhpGetTokenAppContainerFolderPath(tokenHandle, appContainerInfo->TokenAppContainer);
  143.                      }
  144.  
  145.                      PhFree(appContainerInfo);
  146. diff --git a/phlib/basesup.c b/phlib/basesup.c
  147. index 02925fb2..2f113b9a 100644
  148. --- a/phlib/basesup.c
  149. +++ b/phlib/basesup.c
  150. @@ -430,28 +430,6 @@ VOID PhLocalTimeToSystemTime(
  151.      SystemTime->QuadPart = LocalTime->QuadPart + timeZoneBias.QuadPart;
  152.  }
  153.  
  154. -NTSTATUS PhDelayExecution(
  155. -    _In_ LONGLONG Interval
  156. -    )
  157. -{
  158. -    if (Interval == INFINITE) // HACK (dmex)
  159. -    {
  160. -        LARGE_INTEGER interval;
  161. -
  162. -        interval.QuadPart = LLONG_MIN;
  163. -
  164. -        return NtDelayExecution(FALSE, &interval);
  165. -    }
  166. -    else
  167. -    {
  168. -        LARGE_INTEGER interval;
  169. -
  170. -        interval.QuadPart = -(LONGLONG)UInt32x32To64(Interval, PH_TIMEOUT_MS);
  171. -
  172. -        return NtDelayExecution(FALSE, &interval);
  173. -    }
  174. -}
  175. -
  176.  /**
  177.   * Allocates a block of memory.
  178.   *
  179. diff --git a/phlib/include/phbasesup.h b/phlib/include/phbasesup.h
  180. index fbf2fe62..816d82e4 100644
  181. --- a/phlib/include/phbasesup.h
  182. +++ b/phlib/include/phbasesup.h
  183. @@ -89,13 +89,6 @@ PhLocalTimeToSystemTime(
  184.      _Out_ PLARGE_INTEGER SystemTime
  185.      );
  186.  
  187. -PHLIBAPI
  188. -NTSTATUS
  189. -NTAPI
  190. -PhDelayExecution(
  191. -    _In_ LONGLONG Interval
  192. -    );
  193. -
  194.  // Heap
  195.  
  196.  _May_raise_
  197. diff --git a/phlib/include/phutil.h b/phlib/include/phutil.h
  198. index a31825d5..e2923a6c 100644
  199. --- a/phlib/include/phutil.h
  200. +++ b/phlib/include/phutil.h
  201. @@ -1509,6 +1509,13 @@ PhFreeLibraryAsImageResource(
  202.      _In_ PVOID BaseAddress
  203.      );
  204.  
  205. +PHLIBAPI
  206. +NTSTATUS
  207. +NTAPI
  208. +PhDelayExecution(
  209. +    _In_ LONGLONG Interval
  210. +    );
  211. +
  212.  #ifdef __cplusplus
  213.  }
  214.  #endif
  215. diff --git a/phlib/util.c b/phlib/util.c
  216. index 731a5c2c..64399ad0 100644
  217. --- a/phlib/util.c
  218. +++ b/phlib/util.c
  219. @@ -7934,3 +7934,56 @@ NTSTATUS PhFreeLibraryAsImageResource(
  220.  {
  221.      return NtUnmapViewOfSection(NtCurrentProcess(), BaseAddress);
  222.  }
  223. +
  224. +NTSTATUS PhDelayExecutionEx(
  225. +    _In_ BOOLEAN Alertable,
  226. +    _In_opt_ PLARGE_INTEGER DelayInterval
  227. +    )
  228. +{
  229. +    static PH_INITONCE initOnce = PH_INITONCE_INIT;
  230. +    static NTSTATUS (NTAPI* RtlDelayExecution_I)(
  231. +        _In_ BOOLEAN Alertable,
  232. +        _In_opt_ PLARGE_INTEGER DelayInterval
  233. +        ) = NULL;
  234. +
  235. +    if (PhBeginInitOnce(&initOnce))
  236. +    {
  237. +        PVOID ntdll;
  238. +
  239. +        if (ntdll = PhGetLoaderEntryDllBase(L"ntdll.dll"))
  240. +        {
  241. +            RtlDelayExecution_I = PhGetDllBaseProcedureAddress(ntdll, "RtlDelayExecution", 0);
  242. +        }
  243. +
  244. +        PhEndInitOnce(&initOnce);
  245. +    }
  246. +
  247. +    if (RtlDelayExecution_I)
  248. +    {
  249. +        return RtlDelayExecution_I(Alertable, DelayInterval);
  250. +    }
  251. +
  252. +    return NtDelayExecution(Alertable, DelayInterval);
  253. +}
  254. +
  255. +NTSTATUS PhDelayExecution(
  256. +    _In_ LONGLONG Interval
  257. +    )
  258. +{
  259. +    if (Interval == INFINITE) // HACK (dmex)
  260. +    {
  261. +        LARGE_INTEGER interval;
  262. +
  263. +        interval.QuadPart = LLONG_MIN;
  264. +
  265. +        return PhDelayExecutionEx(FALSE, &interval);
  266. +    }
  267. +    else
  268. +    {
  269. +        LARGE_INTEGER interval;
  270. +
  271. +        interval.QuadPart = -(LONGLONG)UInt32x32To64(Interval, PH_TIMEOUT_MS);
  272. +
  273. +        return PhDelayExecutionEx(FALSE, &interval);
  274. +    }
  275. +}
  276. diff --git a/phnt/include/ntbcd.h b/phnt/include/ntbcd.h
  277. new file mode 100644
  278. index 00000000..df06ccdd
  279. --- /dev/null
  280. +++ b/phnt/include/ntbcd.h
  281. @@ -0,0 +1,2120 @@
  282. +/*
  283. + * Process Hacker -
  284. + *   Boot Configuration Data (BCD) support functions
  285. + *
  286. + * This file is part of Process Hacker.
  287. + *
  288. + * Process Hacker is free software; you can redistribute it and/or modify
  289. + * it under the terms of the GNU General Public License as published by
  290. + * the Free Software Foundation, either version 3 of the License, or
  291. + * (at your option) any later version.
  292. + *
  293. + * Process Hacker is distributed in the hope that it will be useful,
  294. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  295. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  296. + * GNU General Public License for more details.
  297. + *
  298. + * You should have received a copy of the GNU General Public License
  299. + * along with Process Hacker.  If not, see <http://www.gnu.org/licenses/>.
  300. + */
  301. +
  302. +#ifndef _NTBCD_H
  303. +#define _NTBCD_H
  304. +
  305. +#ifdef __cplusplus
  306. +extern "C" {
  307. +#endif
  308. +
  309. +#ifndef PHNT_INLINE_BCD_GUIDS
  310. +// 5189B25C-5558-4BF2-BCA4-289B11BD29E2 // {badmemory}
  311. +GUID DECLSPEC_SELECTANY GUID_BAD_MEMORY_GROUP = { 0x5189B25C, 0x5558, 0x4BF2, { 0xBC, 0xA4, 0x28, 0x9B, 0x11, 0xBD, 0x29, 0xE2 } };
  312. +// 6EFB52BF-1766-41DB-A6B3-0EE5EFF72BD7 // {bootloadersettings}
  313. +GUID DECLSPEC_SELECTANY GUID_BOOT_LOADER_SETTINGS_GROUP = { 0x6EFB52BF, 0x1766, 0x41DB, { 0xA6, 0xB3, 0x0E, 0xE5, 0xEF, 0xF7, 0x2B, 0xD7 } };
  314. +// FA926493-6F1C-4193-A414-58F0B2456D1E // {current}
  315. +GUID DECLSPEC_SELECTANY GUID_CURRENT_BOOT_ENTRY = { 0xFA926493, 0x6F1C, 0x4193, { 0xA4, 0x14, 0x58, 0xF0, 0xB2, 0x45, 0x6D, 0x1E } };
  316. +// 4636856E-540F-4170-A130-A84776F4C654 // {eventsettings} {dbgsettings}
  317. +GUID DECLSPEC_SELECTANY GUID_DEBUGGER_SETTINGS_GROUP = { 0x4636856E, 0x540F, 0x4170, { 0xA1, 0x30, 0xA8, 0x47, 0x76, 0xF4, 0xC6, 0x54 } };
  318. +// 1CAE1EB7-A0DF-4D4D-9851-4860E34EF535 // {default}
  319. +GUID DECLSPEC_SELECTANY GUID_DEFAULT_BOOT_ENTRY = { 0x1CAE1EB7, 0xA0DF, 0x4D4D, { 0x98, 0x51, 0x48, 0x60, 0xE3, 0x4E, 0xF5, 0x35 } };
  320. +// 0CE4991B-E6B3-4B16-B23C-5E0D9250E5D9 // {emssettings}
  321. +GUID DECLSPEC_SELECTANY GUID_EMS_SETTINGS_GROUP = { 0x0CE4991B, 0xE6B3, 0x4B16, { 0xB2, 0x3C, 0x5E, 0x0D, 0x92, 0x50, 0xE5, 0xD9 } };
  322. +// A5A30FA2-3D06-4E9F-B5F4-A01DF9D1FCBA // {fwbootmgr}
  323. +GUID DECLSPEC_SELECTANY GUID_FIRMWARE_BOOTMGR = { 0xA5A30FA2, 0x3D06, 0x4E9F, { 0xB5, 0xF4, 0xA0, 0x1D, 0xF9, 0xD1, 0xFC, 0xBA } };
  324. +// 7EA2E1AC-2E61-4728-AAA3-896D9D0A9F0E // {globalsettings}
  325. +GUID DECLSPEC_SELECTANY GUID_GLOBAL_SETTINGS_GROUP = { 0x7EA2E1AC, 0x2E61, 0x4728, { 0xAA, 0xA3, 0x89, 0x6D, 0x9D, 0x0A, 0x9F, 0x0E } };
  326. +// 7FF607E0-4395-11DB-B0DE-0800200C9A66 // {hypervisorsettings}
  327. +GUID DECLSPEC_SELECTANY GUID_HYPERVISOR_SETTINGS_GROUP = { 0x7FF607E0, 0x4395, 0x11DB, { 0xB0, 0xDE, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66 } };
  328. +// 313E8EED-7098-4586-A9BF-309C61F8D449 // {kerneldbgsettings}
  329. +GUID DECLSPEC_SELECTANY GUID_KERNEL_DEBUGGER_SETTINGS_GROUP = { 0x313E8EED, 0x7098, 0x4586, { 0xA9, 0xBF, 0x30, 0x9C, 0x61, 0xF8, 0xD4, 0x49 } };
  330. +// 1AFA9C49-16AB-4A5C-4A90-212802DA9460 // {resumeloadersettings}
  331. +GUID DECLSPEC_SELECTANY GUID_RESUME_LOADER_SETTINGS_GROUP = { 0x1AFA9C49, 0x16AB, 0x4A5C, { 0x4A, 0x90, 0x21, 0x28, 0x02, 0xDA, 0x94, 0x60 } };
  332. +// 9DEA862C-5CDD-4E70-ACC1-F32B344D4795 // {bootmgr}
  333. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_BOOTMGR = { 0x9DEA862C, 0x5CDD, 0x4E70, { 0xAC, 0xC1, 0xF3, 0x2B, 0x34, 0x4D, 0x47, 0x95 } };
  334. +// 466F5A88-0AF2-4F76-9038-095B170DC21C // {ntldr} {legacy}
  335. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_LEGACY_NTLDR = { 0x466F5A88, 0x0AF2, 0x4F76, { 0x90, 0x38, 0x09, 0x5B, 0x17, 0x0D, 0xC2, 0x1C } };
  336. +// B2721D73-1DB4-4C62-BF78-C548A880142D // {memdiag}
  337. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_MEMORY_TESTER = { 0xB2721D73, 0x1DB4, 0x4C62, { 0xBF, 0x78, 0xC5, 0x48, 0xA8, 0x80, 0x14, 0x2D } };
  338. +// B012B84D-C47C-4ED5-B722-C0C42163E569
  339. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_OS_TARGET_TEMPLATE_EFI = { 0xB012B84D, 0xC47C, 0x4ED5, { 0xB7, 0x22, 0xC0, 0xC4, 0x21, 0x63, 0xE5, 0x69 } };
  340. +// A1943BBC-EA85-487C-97C7-C9EDE908A38A
  341. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_OS_TARGET_TEMPLATE_PCAT = { 0xA1943BBC, 0xEA85, 0x487C, { 0x97, 0xC7, 0xC9, 0xED, 0xE9, 0x08, 0xA3, 0x8A } };
  342. +// {0C334284-9A41-4DE1-99B3-A7E87E8FF07E}
  343. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_RESUME_TARGET_TEMPLATE_EFI = { 0x0C334284, 0x9A41, 0x4DE1, { 0x99, 0xB3, 0xA7, 0xE8, 0x7E, 0x8F, 0xF0, 0x7E } };
  344. +// {98B02A23-0674-4CE7-BDAD-E0A15A8FF97B}
  345. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_RESUME_TARGET_TEMPLATE_PCAT = { 0x98B02A23, 0x0674, 0x4CE7, { 0xBD, 0xAD, 0xE0, 0xA1, 0x5A, 0x8F, 0xF9, 0x7B } };
  346. +// A1943BBC-EA85-487C-97C7-C9EDE908A38A
  347. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_SETUP_EFI = { 0x7254A080, 0x1510, 0x4E85, { 0xAC, 0x0F, 0xE7, 0xFB, 0x3D, 0x44, 0x47, 0x36 } };
  348. +// CBD971BF-B7B8-4885-951A-FA03044F5D71
  349. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_SETUP_PCAT = { 0xCBD971BF, 0xB7B8, 0x4885, { 0x95, 0x1A, 0xFA, 0x03, 0x04, 0x4F, 0x5D, 0x71 } };
  350. +// AE5534E0-A924-466C-B836-758539A3EE3A // {ramdiskoptions}
  351. +GUID DECLSPEC_SELECTANY GUID_WINDOWS_SETUP_RAMDISK_OPTIONS = { 0xAE5534E0, 0xA924, 0x466C, { 0xB8, 0x36, 0x75, 0x85, 0x39, 0xA3, 0xEE, 0x3A } };
  352. +#else
  353. +NTSYSAPI GUID GUID_BAD_MEMORY_GROUP; // {badmemory}
  354. +NTSYSAPI GUID GUID_BOOT_LOADER_SETTINGS_GROUP; // {bootloadersettings}
  355. +NTSYSAPI GUID GUID_CURRENT_BOOT_ENTRY; // {current}
  356. +NTSYSAPI GUID GUID_DEBUGGER_SETTINGS_GROUP; // {eventsettings} {dbgsettings}
  357. +NTSYSAPI GUID GUID_DEFAULT_BOOT_ENTRY; // {default}
  358. +NTSYSAPI GUID GUID_EMS_SETTINGS_GROUP; // {emssettings}
  359. +NTSYSAPI GUID GUID_FIRMWARE_BOOTMGR; // {fwbootmgr}
  360. +NTSYSAPI GUID GUID_GLOBAL_SETTINGS_GROUP; // {globalsettings}
  361. +NTSYSAPI GUID GUID_HYPERVISOR_SETTINGS_GROUP; // {hypervisorsettings}
  362. +NTSYSAPI GUID GUID_KERNEL_DEBUGGER_SETTINGS_GROUP; // {kerneldbgsettings}
  363. +NTSYSAPI GUID GUID_RESUME_LOADER_SETTINGS_GROUP; // {resumeloadersettings}
  364. +NTSYSAPI GUID GUID_WINDOWS_BOOTMGR; // {bootmgr}
  365. +NTSYSAPI GUID GUID_WINDOWS_LEGACY_NTLDR; // {ntldr} {legacy}
  366. +NTSYSAPI GUID GUID_WINDOWS_MEMORY_TESTER; // {memdiag}
  367. +NTSYSAPI GUID GUID_WINDOWS_OS_TARGET_TEMPLATE_EFI;
  368. +NTSYSAPI GUID GUID_WINDOWS_OS_TARGET_TEMPLATE_PCAT;
  369. +NTSYSAPI GUID GUID_WINDOWS_RESUME_TARGET_TEMPLATE_EFI;
  370. +NTSYSAPI GUID GUID_WINDOWS_RESUME_TARGET_TEMPLATE_PCAT;
  371. +NTSYSAPI GUID GUID_WINDOWS_SETUP_EFI;
  372. +NTSYSAPI GUID GUID_WINDOWS_SETUP_PCAT;
  373. +NTSYSAPI GUID GUID_WINDOWS_SETUP_RAMDISK_OPTIONS; // {ramdiskoptions}
  374. +#endif
  375. +
  376. +typedef enum _BCD_MESSAGE_TYPE
  377. +{
  378. +    BCD_MESSAGE_TYPE_NONE,
  379. +    BCD_MESSAGE_TYPE_TRACE,
  380. +    BCD_MESSAGE_TYPE_INFORMATION,
  381. +    BCD_MESSAGE_TYPE_WARNING,
  382. +    BCD_MESSAGE_TYPE_ERROR,
  383. +    BCD_MESSAGE_TYPE_MAXIMUM
  384. +} BCD_MESSAGE_TYPE;
  385. +
  386. +typedef VOID (CALLBACK* BCD_MESSAGE_CALLBACK)(
  387. +    _In_ BCD_MESSAGE_TYPE type,
  388. +    _In_ PWSTR Message
  389. +    );
  390. +
  391. +NTSYSAPI
  392. +NTSTATUS
  393. +NTAPI
  394. +BcdSetLogging(
  395. +    _In_ BCD_MESSAGE_TYPE BcdLoggingLevel,
  396. +    _In_ BCD_MESSAGE_CALLBACK BcdMessageCallbackRoutine
  397. +    );
  398. +
  399. +NTSYSAPI
  400. +VOID
  401. +NTAPI
  402. +BcdInitializeBcdSyncMutant(
  403. +    VOID
  404. +    );
  405. +
  406. +NTSYSAPI
  407. +NTSTATUS
  408. +NTAPI
  409. +BcdGetSystemStorePath(
  410. +    _Out_ PWSTR* BcdSystemStorePath
  411. +    );
  412. +
  413. +NTSYSAPI
  414. +NTSTATUS
  415. +NTAPI
  416. +BcdSetSystemStoreDevice(
  417. +    _In_ UNICODE_STRING SystemPartition
  418. +    );
  419. +
  420. +NTSYSAPI
  421. +NTSTATUS
  422. +NTAPI
  423. +BcdOpenSystemStore(
  424. +    _Out_ PHANDLE BcdStoreHandle
  425. +    );
  426. +
  427. +NTSYSAPI
  428. +NTSTATUS
  429. +NTAPI
  430. +BcdOpenStoreFromFile(
  431. +    _In_ UNICODE_STRING BcdFilePath,
  432. +    _Out_ PHANDLE BcdStoreHandle
  433. +    );
  434. +
  435. +NTSYSAPI
  436. +NTSTATUS
  437. +NTAPI
  438. +BcdCreateStore(
  439. +    _In_ UNICODE_STRING BcdFilePath,
  440. +    _Out_ PHANDLE BcdStoreHandle
  441. +    );
  442. +
  443. +NTSYSAPI
  444. +NTSTATUS
  445. +NTAPI
  446. +BcdExportStore(
  447. +    _In_ UNICODE_STRING BcdFilePath
  448. +    );
  449. +
  450. +NTSYSAPI
  451. +NTSTATUS
  452. +NTAPI
  453. +BcdImportStore(
  454. +    _In_ UNICODE_STRING BcdFilePath
  455. +    );
  456. +
  457. +typedef enum _BCD_IMPORT_FLAGS
  458. +{
  459. +    BCD_IMPORT_NONE,
  460. +    BCD_IMPORT_DELETE_FIRMWARE_OBJECTS
  461. +} BCD_IMPORT_FLAGS;
  462. +
  463. +NTSYSAPI
  464. +NTSTATUS
  465. +NTAPI
  466. +BcdImportStoreWithFlags(
  467. +    _In_ UNICODE_STRING BcdFilePath,
  468. +    _In_ BCD_IMPORT_FLAGS BcdImportFlags
  469. +    );
  470. +
  471. +NTSYSAPI
  472. +NTSTATUS
  473. +NTAPI
  474. +BcdDeleteObjectReferences(
  475. +    _In_ HANDLE BcdStoreHandle,
  476. +    _In_ PGUID Identifier
  477. +    );
  478. +
  479. +NTSYSAPI
  480. +NTSTATUS
  481. +NTAPI
  482. +BcdDeleteSystemStore(
  483. +    VOID
  484. +    );
  485. +
  486. +typedef enum _BCD_OPEN_FLAGS
  487. +{
  488. +    BCD_OPEN_NONE,
  489. +    BCD_OPEN_OPEN_STORE_OFFLINE,
  490. +    BCD_OPEN_SYNC_FIRMWARE_ENTRIES
  491. +} BCD_OPEN_FLAGS;
  492. +
  493. +NTSYSAPI
  494. +NTSTATUS
  495. +NTAPI
  496. +BcdOpenStore(
  497. +    _In_ UNICODE_STRING BcdFilePath,
  498. +    _In_ BCD_OPEN_FLAGS BcdOpenFlags,
  499. +    _Out_ PHANDLE BcdStoreHandle
  500. +    );
  501. +
  502. +NTSYSAPI
  503. +NTSTATUS
  504. +NTAPI
  505. +BcdCloseStore(
  506. +    _In_ HANDLE BcdStoreHandle
  507. +    );
  508. +
  509. +NTSYSAPI
  510. +NTSTATUS
  511. +NTAPI
  512. +BcdFlushStore(
  513. +    _In_ HANDLE BcdStoreHandle
  514. +    );
  515. +
  516. +NTSYSAPI
  517. +NTSTATUS
  518. +NTAPI
  519. +BcdForciblyUnloadStore(
  520. +    _In_ HANDLE BcdStoreHandle
  521. +    );
  522. +
  523. +NTSYSAPI
  524. +NTSTATUS
  525. +NTAPI
  526. +BcdMarkAsSystemStore(
  527. +    _In_ HANDLE BcdStoreHandle
  528. +    );
  529. +
  530. +typedef enum _BCD_OBJECT_TYPE
  531. +{
  532. +    BCD_OBJECT_TYPE_NONE,
  533. +    BCD_OBJECT_TYPE_APPLICATION,
  534. +    BCD_OBJECT_TYPE_INHERITED,
  535. +    BCD_OBJECT_TYPE_DEVICE
  536. +} BCD_OBJECT_TYPE;
  537. +
  538. +typedef enum _BCD_APPLICATION_OBJECT_TYPE
  539. +{
  540. +    BCD_APPLICATION_OBJECT_NONE = 0,
  541. +    BCD_APPLICATION_OBJECT_FIRMWARE_BOOT_MANAGER = 1,
  542. +    BCD_APPLICATION_OBJECT_WINDOWS_BOOT_MANAGER = 2,
  543. +    BCD_APPLICATION_OBJECT_WINDOWS_BOOT_LOADER = 3,
  544. +    BCD_APPLICATION_OBJECT_WINDOWS_RESUME_APPLICATION = 4,
  545. +    BCD_APPLICATION_OBJECT_MEMORY_TESTER = 5,
  546. +    BCD_APPLICATION_OBJECT_LEGACY_NTLDR = 6,
  547. +    BCD_APPLICATION_OBJECT_LEGACY_SETUPLDR = 7,
  548. +    BCD_APPLICATION_OBJECT_BOOT_SECTOR = 8,
  549. +    BCD_APPLICATION_OBJECT_STARTUP_MODULE = 9,
  550. +    BCD_APPLICATION_OBJECT_GENERIC_APPLICATION = 10,
  551. +    BCD_APPLICATION_OBJECT_RESERVED = 0xFFFFF
  552. +} BCD_APPLICATION_OBJECT_TYPE;
  553. +
  554. +typedef enum _BCD_APPLICATION_IMAGE_TYPE
  555. +{
  556. +    BCD_APPLICATION_IMAGE_NONE,
  557. +    BCD_APPLICATION_IMAGE_FIRMWARE_APPLICATION,
  558. +    BCD_APPLICATION_IMAGE_BOOT_APPLICATION,
  559. +    BCD_APPLICATION_IMAGE_LEGACY_LOADER,
  560. +    BCD_APPLICATION_IMAGE_REALMODE_CODE
  561. +} BCD_APPLICATION_IMAGE_TYPE;
  562. +
  563. +typedef enum _BCD_INHERITED_CLASS_TYPE
  564. +{
  565. +    BCD_INHERITED_CLASS_NONE,
  566. +    BCD_INHERITED_CLASS_LIBRARY,
  567. +    BCD_INHERITED_CLASS_APPLICATION,
  568. +    BCD_INHERITED_CLASS_DEVICE
  569. +} BCD_INHERITED_CLASS_TYPE;
  570. +
  571. +#define MAKE_BCD_APPLICATION_OBJECT(ImageType, ApplicationType) \
  572. +    (((ULONG)BCD_OBJECT_TYPE_APPLICATION << 28) | \
  573. +    (((ULONG)(ImageType) & 0xF) << 20) | \
  574. +    ((ULONG)(ApplicationType) & 0xFFFFF))
  575. +
  576. +#define GET_BCD_APPLICATION_IMAGE(DataType) \
  577. +    ((BCD_APPLICATION_IMAGE_TYPE)(((((ULONG)DataType)) >> 20) & 0xF))
  578. +#define GET_BCD_APPLICATION_OBJECT(DataType) \
  579. +    ((BCD_APPLICATION_OBJECT_TYPE)((((ULONG)DataType)) & 0xFFFFF))
  580. +
  581. +#define GET_BCD_OBJECT_TYPE(DataType) \
  582. +    ((BCD_OBJECT_TYPE)(((((ULONG)DataType)) >> 28) & 0xF))
  583. +
  584. +typedef union _BCD_OBJECT_DATATYPE
  585. +{
  586. +    ULONG PackedValue;
  587. +    union
  588. +    {
  589. +        struct
  590. +        {
  591. +            ULONG Reserved : 28;
  592. +            BCD_OBJECT_TYPE ObjectType : 4;
  593. +        };
  594. +        struct
  595. +        {
  596. +            BCD_APPLICATION_OBJECT_TYPE ApplicationType : 20;
  597. +            BCD_APPLICATION_IMAGE_TYPE ImageType : 4;
  598. +            ULONG Reserved : 4;
  599. +            ULONG ObjectType : 4;
  600. +        } Application;
  601. +        struct
  602. +        {
  603. +            ULONG Value : 20;
  604. +            BCD_INHERITED_CLASS_TYPE Class : 4;
  605. +            ULONG Reserved : 4;
  606. +            ULONG ObjectType : 4;
  607. +        } Inherit;
  608. +        struct
  609. +        {
  610. +            ULONG Reserved : 28;
  611. +            ULONG ObjectType : 4;
  612. +        } Device;
  613. +    };
  614. +} BCD_OBJECT_DATATYPE, *PBCD_OBJECT_DATATYPE;
  615. +
  616. +#define BCD_OBJECT_DESCRIPTION_VERSION 0x1
  617. +
  618. +typedef struct _BCD_OBJECT_DESCRIPTION
  619. +{
  620. +    ULONG Version; // BCD_OBJECT_DESCRIPTION_VERSION
  621. +    ULONG Type; // BCD_OBJECT_DATATYPE
  622. +} BCD_OBJECT_DESCRIPTION, *PBCD_OBJECT_DESCRIPTION;
  623. +
  624. +typedef struct _BCD_OBJECT
  625. +{
  626. +    GUID Identifer;
  627. +    PBCD_OBJECT_DESCRIPTION Description;
  628. +} BCD_OBJECT, *PBCD_OBJECT;
  629. +
  630. +NTSYSAPI
  631. +NTSTATUS
  632. +NTAPI
  633. +BcdEnumerateObjects(
  634. +    _In_ HANDLE BcdStoreHandle,
  635. +    _In_ PBCD_OBJECT_DESCRIPTION BcdEnumDescriptor,
  636. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer, // BCD_OBJECT[]
  637. +    _Inout_ PULONG BufferSize,
  638. +    _Out_ PULONG BcdObjectCount
  639. +    );
  640. +
  641. +NTSYSAPI
  642. +NTSTATUS
  643. +NTAPI
  644. +BcdOpenObject(
  645. +    _In_ HANDLE BcdStoreHandle,
  646. +    _In_ PGUID Identifier,
  647. +    _Out_ PHANDLE BcdObjectHandle
  648. +    );
  649. +
  650. +NTSYSAPI
  651. +NTSTATUS
  652. +NTAPI
  653. +BcdCreateObject(
  654. +    _In_ HANDLE BcdStoreHandle,
  655. +    _In_ PGUID Identifier,
  656. +    _In_ PBCD_OBJECT_DESCRIPTION Description,
  657. +    _Out_ PHANDLE BcdObjectHandle
  658. +    );
  659. +
  660. +NTSYSAPI
  661. +NTSTATUS
  662. +NTAPI
  663. +BcdDeleteObject(
  664. +    _In_ HANDLE BcdObjectHandle
  665. +    );
  666. +
  667. +NTSYSAPI
  668. +NTSTATUS
  669. +NTAPI
  670. +BcdCloseObject(
  671. +    _In_ HANDLE BcdObjectHandle
  672. +    );
  673. +
  674. +typedef enum _BCD_COPY_FLAGS
  675. +{
  676. +    BCD_COPY_NONE = 0x0,
  677. +    BCD_COPY_COPY_CREATE_NEW_OBJECT_IDENTIFIER = 0x1,
  678. +    BCD_COPY_COPY_DELETE_EXISTING_OBJECT = 0x2,
  679. +    BCD_COPY_COPY_UNKNOWN_FIRMWARE_APPLICATION = 0x4,
  680. +    BCD_COPY_IGNORE_SETUP_TEMPLATE_ELEMENTS = 0x8,
  681. +    BCD_COPY_RETAIN_ELEMENT_DATA = 0x10,
  682. +    BCD_COPY_MIGRATE_ELEMENT_DATA = 0x20
  683. +} BCD_COPY_FLAGS;
  684. +
  685. +NTSYSAPI
  686. +NTSTATUS
  687. +NTAPI
  688. +BcdCopyObject(
  689. +    _In_ HANDLE BcdStoreHandle,
  690. +    _In_ HANDLE BcdObjectHandle,
  691. +    _In_ BCD_COPY_FLAGS BcdCopyFlags,
  692. +    _In_ HANDLE TargetStoreHandle,
  693. +    _Out_ PHANDLE TargetHandleOut
  694. +    );
  695. +
  696. +NTSYSAPI
  697. +NTSTATUS
  698. +NTAPI
  699. +BcdCopyObjectEx(
  700. +    _In_ HANDLE BcdStoreHandle,
  701. +    _In_ HANDLE BcdObjectHandle,
  702. +    _In_ BCD_COPY_FLAGS BcdCopyFlags,
  703. +    _In_ HANDLE TargetStoreHandle,
  704. +    _In_ PGUID TargetObjectId,
  705. +    _Out_ PHANDLE TargetHandleOut
  706. +    );
  707. +
  708. +NTSYSAPI
  709. +NTSTATUS
  710. +NTAPI
  711. +BcdCopyObjects(
  712. +    _In_ HANDLE BcdStoreHandle,
  713. +    _In_ BCD_OBJECT_DESCRIPTION Characteristics,
  714. +    _In_ BCD_COPY_FLAGS BcdCopyFlags,
  715. +    _In_ HANDLE TargetStoreHandle
  716. +    );
  717. +
  718. +NTSYSAPI
  719. +NTSTATUS
  720. +NTAPI
  721. +BcdMigrateObjectElementValues(
  722. +    _In_ HANDLE TemplateObjectHandle,
  723. +    _In_ HANDLE SourceObjectHandle,
  724. +    _In_ HANDLE TargetObjectHandle
  725. +    );
  726. +
  727. +NTSYSAPI
  728. +NTSTATUS
  729. +NTAPI
  730. +BcdQueryObject(
  731. +    _In_ HANDLE BcdObjectHandle,
  732. +    _In_ ULONG BcdVersion, // BCD_OBJECT_DESCRIPTION_VERSION
  733. +    _Out_ BCD_OBJECT_DESCRIPTION Description,
  734. +    _Out_ PGUID Identifier
  735. +    );
  736. +
  737. +typedef enum _BCD_ELEMENT_DATATYPE_FORMAT
  738. +{
  739. +    BCD_ELEMENT_DATATYPE_FORMAT_UNKNOWN,
  740. +    BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, // 0x01000000
  741. +    BCD_ELEMENT_DATATYPE_FORMAT_STRING, // 0x02000000
  742. +    BCD_ELEMENT_DATATYPE_FORMAT_OBJECT, // 0x03000000
  743. +    BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, // 0x04000000
  744. +    BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, // 0x05000000
  745. +    BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, // 0x06000000
  746. +    BCD_ELEMENT_DATATYPE_FORMAT_INTEGERLIST, // 0x07000000
  747. +    BCD_ELEMENT_DATATYPE_FORMAT_BINARY // 0x08000000
  748. +} BCD_ELEMENT_DATATYPE_FORMAT;
  749. +
  750. +typedef enum _BCD_ELEMENT_DATATYPE_CLASS
  751. +{
  752. +    BCD_ELEMENT_DATATYPE_CLASS_NONE,
  753. +    BCD_ELEMENT_DATATYPE_CLASS_LIBRARY,
  754. +    BCD_ELEMENT_DATATYPE_CLASS_APPLICATION,
  755. +    BCD_ELEMENT_DATATYPE_CLASS_DEVICE,
  756. +    BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE,
  757. +    BCD_ELEMENT_DATATYPE_CLASS_OEM
  758. +} BCD_ELEMENT_DATATYPE_CLASS;
  759. +
  760. +typedef enum _BCD_ELEMENT_DEVICE_TYPE
  761. +{
  762. +    BCD_ELEMENT_DEVICE_TYPE_NONE,
  763. +    BCD_ELEMENT_DEVICE_TYPE_BOOT_DEVICE,
  764. +    BCD_ELEMENT_DEVICE_TYPE_PARTITION,
  765. +    BCD_ELEMENT_DEVICE_TYPE_FILE,
  766. +    BCD_ELEMENT_DEVICE_TYPE_RAMDISK,
  767. +    BCD_ELEMENT_DEVICE_TYPE_UNKNOWN,
  768. +    BCD_ELEMENT_DEVICE_TYPE_QUALIFIED_PARTITION,
  769. +    BCD_ELEMENT_DEVICE_TYPE_VMBUS,
  770. +    BCD_ELEMENT_DEVICE_TYPE_LOCATE_DEVICE,
  771. +    BCD_ELEMENT_DEVICE_TYPE_URI,
  772. +    BCD_ELEMENT_DEVICE_TYPE_COMPOSITE
  773. +} BCD_ELEMENT_DEVICE_TYPE;
  774. +
  775. +#define MAKE_BCDE_DATA_TYPE(Class, Format, Subtype) \
  776. +    (((((ULONG)Class) & 0xF) << 28) | ((((ULONG)Format) & 0xF) << 24) | (((ULONG)Subtype) & 0x00FFFFFF))
  777. +
  778. +#define GET_BCDE_DATA_CLASS(DataType) \
  779. +    ((BCD_ELEMENT_DATATYPE_CLASS)(((((ULONG)DataType)) >> 28) & 0xF))
  780. +#define GET_BCDE_DATA_FORMAT(DataType) \
  781. +    ((BCD_ELEMENT_DATATYPE_FORMAT)(((((ULONG)DataType)) >> 24) & 0xF))
  782. +#define GET_BCDE_DATA_SUBTYPE(DataType) \
  783. +    ((ULONG)((((ULONG)DataType)) & 0x00FFFFFF))
  784. +
  785. +typedef struct _BCD_ELEMENT_DATATYPE
  786. +{
  787. +    union
  788. +    {
  789. +        ULONG PackedValue;
  790. +        struct
  791. +        {
  792. +            ULONG SubType : 24;
  793. +            BCD_ELEMENT_DATATYPE_FORMAT Format : 4;
  794. +            BCD_ELEMENT_DATATYPE_CLASS Class : 4;
  795. +        };
  796. +    };
  797. +} BCD_ELEMENT_DATATYPE, *PBCD_ELEMENT_DATATYPE;
  798. +
  799. +NTSYSAPI
  800. +NTSTATUS
  801. +NTAPI
  802. +BcdEnumerateElementTypes(
  803. +    _In_ HANDLE BcdObjectHandle,
  804. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer, // BCD_ELEMENT_DATATYPE[]
  805. +    _Inout_ PULONG BufferSize,
  806. +    _Out_ PULONG ElementCount
  807. +    );
  808. +
  809. +typedef struct _BCD_ELEMENT_DEVICE_QUALIFIED_PARTITION
  810. +{
  811. +    ULONG PartitionStyle;
  812. +    ULONG Reserved;
  813. +    struct
  814. +    {
  815. +        union
  816. +        {
  817. +            ULONG DiskSignature;
  818. +            ULONG64 PartitionOffset;
  819. +        } Mbr;
  820. +        union
  821. +        {
  822. +            GUID DiskSignature;
  823. +            GUID PartitionSignature;
  824. +        } Gpt;
  825. +    };
  826. +} BCD_ELEMENT_DEVICE_QUALIFIED_PARTITION, *PBCD_ELEMENT_DEVICE_QUALIFIED_PARTITION;
  827. +
  828. +typedef struct _BCD_ELEMENT_DEVICE
  829. +{
  830. +    ULONG DeviceType;
  831. +    GUID AdditionalOptions;
  832. +    struct
  833. +    {
  834. +        union
  835. +        {
  836. +            ULONG ParentOffset;
  837. +            WCHAR Path[ANYSIZE_ARRAY];
  838. +        } File;
  839. +        union
  840. +        {
  841. +            WCHAR Path[ANYSIZE_ARRAY];
  842. +        } Partition;
  843. +        union
  844. +        {
  845. +            ULONG Type;
  846. +            ULONG ParentOffset;
  847. +            ULONG ElementType;
  848. +            WCHAR Path[ANYSIZE_ARRAY];
  849. +        } Locate;
  850. +        union
  851. +        {
  852. +            GUID InterfaceInstance;
  853. +        } Vmbus;
  854. +        union
  855. +        {
  856. +            ULONG Data[ANYSIZE_ARRAY];
  857. +        } Unknown;
  858. +        BCD_ELEMENT_DEVICE_QUALIFIED_PARTITION QualifiedPartition;
  859. +    };
  860. +} BCD_ELEMENT_DEVICE, *PBCD_ELEMENT_DEVICE;
  861. +
  862. +typedef struct _BCD_ELEMENT_STRING
  863. +{
  864. +    WCHAR Value[ANYSIZE_ARRAY];
  865. +} BCD_ELEMENT_STRING, *PBCD_ELEMENT_STRING;
  866. +
  867. +typedef struct _BCD_ELEMENT_OBJECT
  868. +{
  869. +    GUID Object;
  870. +} BCD_ELEMENT_OBJECT, *PBCD_ELEMENT_OBJECT;
  871. +
  872. +typedef struct _BCD_ELEMENT_OBJECT_LIST
  873. +{
  874. +    GUID ObjectList[ANYSIZE_ARRAY];
  875. +} BCD_ELEMENT_OBJECT_LIST, *PBCD_ELEMENT_OBJECT_LIST;
  876. +
  877. +typedef struct _BCD_ELEMENT_INTEGER
  878. +{
  879. +    ULONG64 Value;
  880. +} BCD_ELEMENT_INTEGER, *PBCD_ELEMENT_INTEGER;
  881. +
  882. +typedef struct _BCD_ELEMENT_INTEGER_LIST
  883. +{
  884. +    ULONG64 Value[ANYSIZE_ARRAY];
  885. +} BCD_ELEMENT_INTEGER_LIST, *PBCD_ELEMENT_INTEGER_LIST;
  886. +
  887. +typedef struct _BCD_ELEMENT_BOOLEAN
  888. +{
  889. +    BOOLEAN Value;
  890. +    BOOLEAN Pad;
  891. +} BCD_ELEMENT_BOOLEAN, *PBCD_ELEMENT_BOOLEAN;
  892. +
  893. +#define BCD_ELEMENT_DESCRIPTION_VERSION 0x1
  894. +
  895. +typedef struct BCD_ELEMENT_DESCRIPTION
  896. +{
  897. +    ULONG Version; // BCD_ELEMENT_DESCRIPTION_VERSION
  898. +    ULONG Type;
  899. +    ULONG DataSize;
  900. +} BCD_ELEMENT_DESCRIPTION, *PBCD_ELEMENT_DESCRIPTION;
  901. +
  902. +typedef struct _BCD_ELEMENT
  903. +{
  904. +    PBCD_ELEMENT_DESCRIPTION Description;
  905. +    PVOID Data;
  906. +} BCD_ELEMENT, *PBCD_ELEMENT;
  907. +
  908. +NTSYSAPI
  909. +NTSTATUS
  910. +NTAPI
  911. +BcdEnumerateElements(
  912. +    _In_ HANDLE BcdObjectHandle,
  913. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer, // BCD_ELEMENT[]
  914. +    _Inout_ PULONG BufferSize,
  915. +    _Out_ PULONG ElementCount
  916. +    );
  917. +
  918. +typedef enum _BCD_FLAGS
  919. +{
  920. +    BCD_FLAG_NONE = 0x0,
  921. +    BCD_FLAG_QUALIFIED_PARTITION = 0x1,
  922. +    BCD_FLAG_NO_DEVICE_TRANSLATION = 0x2,
  923. +    BCD_FLAG_ENUMERATE_INHERITED_OBJECTS = 0x4,
  924. +    BCD_FLAG_ENUMERATE_DEVICE_OPTIONS = 0x8,
  925. +    BCD_FLAG_OBSERVE_PRECEDENCE = 0x10,
  926. +    BCD_FLAG_DISABLE_VHD_NT_TRANSLATION = 0x20,
  927. +    BCD_FLAG_DISABLE_VHD_DEVICE_DETECTION = 0x40,
  928. +    BCD_FLAG_DISABLE_POLICY_CHECKS = 0x80
  929. +} BCD_FLAGS;
  930. +
  931. +NTSYSAPI
  932. +NTSTATUS
  933. +NTAPI
  934. +BcdEnumerateElementsWithFlags(
  935. +    _In_ HANDLE BcdObjectHandle,
  936. +    _In_ BCD_FLAGS BcdFlags,
  937. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer, // BCD_ELEMENT[]
  938. +    _Inout_ PULONG BufferSize,
  939. +    _Out_ PULONG ElementCount
  940. +    );
  941. +
  942. +NTSYSAPI
  943. +NTSTATUS
  944. +NTAPI
  945. +BcdEnumerateAndUnpackElements(
  946. +    _In_ HANDLE BcdStoreHandle,
  947. +    _In_ HANDLE BcdObjectHandle,
  948. +    _In_ BCD_FLAGS BcdFlags,
  949. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer, // BCD_ELEMENT[]
  950. +    _Inout_ PULONG BufferSize,
  951. +    _Out_ PULONG ElementCount
  952. +    );
  953. +
  954. +NTSYSAPI
  955. +NTSTATUS
  956. +NTAPI
  957. +BcdGetElementData(
  958. +    _In_ HANDLE BcdObjectHandle,
  959. +    _In_ ULONG BcdElement, // BCD_ELEMENT_DATATYPE
  960. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer,
  961. +    _Inout_ PULONG BufferSize
  962. +    );
  963. +
  964. +NTSYSAPI
  965. +NTSTATUS
  966. +NTAPI
  967. +BcdGetElementDataWithFlags(
  968. +    _In_ HANDLE BcdObjectHandle,
  969. +    _In_ ULONG BcdElement, // BCD_ELEMENT_DATATYPE
  970. +    _In_ BCD_FLAGS BcdFlags,
  971. +    _Out_writes_bytes_opt_(*BufferSize) PVOID Buffer,
  972. +    _Inout_ PULONG BufferSize
  973. +    );
  974. +
  975. +NTSYSAPI
  976. +NTSTATUS
  977. +NTAPI
  978. +BcdSetElementData(
  979. +    _In_ HANDLE BcdObjectHandle,
  980. +    _In_ ULONG BcdElement, // BCD_ELEMENT_DATATYPE
  981. +    _In_reads_bytes_opt_(BufferSize) PVOID Buffer,
  982. +    _In_ ULONG BufferSize
  983. +    );
  984. +
  985. +NTSYSAPI
  986. +NTSTATUS
  987. +NTAPI
  988. +BcdSetElementDataWithFlags(
  989. +    _In_ HANDLE BcdObjectHandle,
  990. +    _In_ ULONG BcdElement, // BCD_ELEMENT_DATATYPE
  991. +    _In_ BCD_FLAGS BcdFlags,
  992. +    _In_reads_bytes_opt_(BufferSize) PVOID Buffer,
  993. +    _In_ ULONG BufferSize
  994. +    );
  995. +
  996. +NTSYSAPI
  997. +NTSTATUS
  998. +NTAPI
  999. +BcdDeleteElement(
  1000. +    _In_ HANDLE BcdObjectHandle,
  1001. +    _In_ ULONG BcdElement // BCD_ELEMENT_DATATYPE
  1002. +    );
  1003. +
  1004. +// Element types
  1005. +
  1006. +typedef enum _BcdBootMgrElementTypes
  1007. +{
  1008. +    /// <summary>
  1009. +    /// The order in which BCD objects should be displayed.
  1010. +    /// Objects are displayed using the string specified by the BcdLibraryString_Description element.
  1011. +    /// </summary>
  1012. +    /// <remarks>0x24000001</remarks>
  1013. +    BcdBootMgrObjectList_DisplayOrder = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 1),
  1014. +    /// <summary>
  1015. +    /// List of boot environment applications the boot manager should execute.
  1016. +    /// The applications are executed in the order they appear in this list.
  1017. +    /// If the firmware boot manager does not support loading multiple applications, this list cannot contain more than one entry.
  1018. +    /// </summary>
  1019. +    /// <remarks>0x24000002</remarks>
  1020. +    BcdBootMgrObjectList_BootSequence = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 2),
  1021. +    /// <summary>
  1022. +    /// The default boot environment application to load if the user does not select one.
  1023. +    /// </summary>
  1024. +    /// <remarks>0x23000003</remarks>
  1025. +    BcdBootMgrObject_DefaultObject = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECT, 3),
  1026. +    /// <summary>
  1027. +    /// The maximum number of seconds a boot selection menu is to be displayed to the user.
  1028. +    /// The menu is displayed until the user selects an option or the time-out expires.
  1029. +    /// If this value is not specified, the boot manager waits for the user to make a selection.
  1030. +    /// </summary>
  1031. +    /// <remarks>0x25000004</remarks>
  1032. +    BcdBootMgrInteger_Timeout = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 4),
  1033. +    /// <summary>
  1034. +    /// Indicates that a resume operation should be attempted during a system restart.
  1035. +    /// </summary>
  1036. +    /// <remarks>0x26000005</remarks>
  1037. +    BcdBootMgrBoolean_AttemptResume = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 5),
  1038. +    /// <summary>
  1039. +    /// The resume application object.
  1040. +    /// </summary>
  1041. +    /// <remarks>0x23000006</remarks>
  1042. +    BcdBootMgrObject_ResumeObject = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECT, 6),
  1043. +    /// <summary>
  1044. +    ///
  1045. +    /// </summary>
  1046. +    /// <remarks>0x24000007</remarks>
  1047. +    BcdBootMgrObjectList_StartupSequence = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 7),
  1048. +    /// <summary>
  1049. +    /// The boot manager tools display order list.
  1050. +    /// </summary>
  1051. +    /// <remarks>0x24000010</remarks>
  1052. +    BcdBootMgrObjectList_ToolsDisplayOrder = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 16),
  1053. +    /// <summary>
  1054. +    /// Forces the display of the legacy boot menu, regardless of the number of OS entries in the BCD store and their BcdOSLoaderInteger_BootMenuPolicy.
  1055. +    /// </summary>
  1056. +    /// <remarks>0x26000020</remarks>
  1057. +    BcdBootMgrBoolean_DisplayBootMenu = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 32),
  1058. +    /// <summary>
  1059. +    /// Indicates whether the display of errors should be suppressed.
  1060. +    /// If this setting is enabled, the boot manager exits to the multi-OS menu on OS launch error.
  1061. +    /// </summary>
  1062. +    /// <remarks>0x26000021</remarks>
  1063. +    BcdBootMgrBoolean_NoErrorDisplay = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 33),
  1064. +    /// <summary>
  1065. +    /// The device on which the boot application resides.
  1066. +    /// </summary>
  1067. +    /// <remarks>0x21000022</remarks>
  1068. +    BcdBootMgrDevice_BcdDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 34),
  1069. +    /// <summary>
  1070. +    /// The boot application.
  1071. +    /// </summary>
  1072. +    /// <remarks>0x22000023</remarks>
  1073. +    BcdBootMgrString_BcdFilePath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 35),
  1074. +    /// <summary>
  1075. +    ///
  1076. +    /// </summary>
  1077. +    /// <remarks>0x26000024</remarks>
  1078. +    BcdBootMgrBoolean_HormEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 36),
  1079. +    /// <summary>
  1080. +    ///
  1081. +    /// </summary>
  1082. +    /// <remarks>0x26000025</remarks>
  1083. +    BcdBootMgrBoolean_HiberRoot = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 37),
  1084. +    /// <summary>
  1085. +    ///
  1086. +    /// </summary>
  1087. +    /// <remarks>0x22000026</remarks>
  1088. +    BcdBootMgrString_PasswordOverride = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 38),
  1089. +    /// <summary>
  1090. +    ///
  1091. +    /// </summary>
  1092. +    /// <remarks>0x22000027</remarks>
  1093. +    BcdBootMgrString_PinpassPhraseOverride = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 39),
  1094. +    /// <summary>
  1095. +    /// Controls whether custom actions are processed before a boot sequence.
  1096. +    /// Note This value is supported starting in Windows 8 and Windows Server 2012.
  1097. +    /// </summary>
  1098. +    /// <remarks>0x26000028</remarks>
  1099. +    BcdBootMgrBoolean_ProcessCustomActionsFirst = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 40),
  1100. +    /// <summary>
  1101. +    /// Custom Bootstrap Actions.
  1102. +    /// </summary>
  1103. +    /// <remarks>0x27000030</remarks>
  1104. +    BcdBootMgrIntegerList_CustomActionsList = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGERLIST, 48),
  1105. +    /// <summary>
  1106. +    /// Controls whether a boot sequence persists across multiple boots.
  1107. +    /// Note This value is supported starting in Windows 8 and Windows Server 2012.
  1108. +    /// </summary>
  1109. +    /// <remarks>0x26000031</remarks>
  1110. +    BcdBootMgrBoolean_PersistBootSequence = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 49)
  1111. +} BcdBootMgrElementTypes;
  1112. +
  1113. +typedef enum _BcdLibrary_FirstMegabytePolicy
  1114. +{
  1115. +    /// <summary>
  1116. +    /// Use none of the first megabyte of memory.
  1117. +    /// </summary>
  1118. +    FirstMegabytePolicyUseNone,
  1119. +    /// <summary>
  1120. +    /// Use all of the first megabyte of memory.
  1121. +    /// </summary>
  1122. +    FirstMegabytePolicyUseAll,
  1123. +    /// <summary>
  1124. +    /// Reserved for future use.
  1125. +    /// </summary>
  1126. +    FirstMegabytePolicyUsePrivate
  1127. +} BcdLibrary_FirstMegabytePolicy;
  1128. +
  1129. +typedef enum _BcdLibrary_DebuggerType
  1130. +{
  1131. +    DebuggerSerial = 0,
  1132. +    Debugger1394 = 1,
  1133. +    DebuggerUsb = 2,
  1134. +    DebuggerNet = 3,
  1135. +    DebuggerLocal = 4
  1136. +} BcdLibrary_DebuggerType;
  1137. +
  1138. +typedef enum _BcdLibrary_DebuggerStartPolicy
  1139. +{
  1140. +    /// <summary>
  1141. +    /// The debugger will start active.
  1142. +    /// </summary>
  1143. +    DebuggerStartActive,
  1144. +    /// <summary>
  1145. +    /// The debugger will start in the auto-enabled state.
  1146. +    /// If a debugger is attached it will be used; otherwise the debugger port will be available for other applications.
  1147. +    /// </summary>
  1148. +    DebuggerStartAutoEnable,
  1149. +    /// <summary>
  1150. +    /// The debugger will not start.
  1151. +    /// </summary>
  1152. +    DebuggerStartDisable
  1153. +} BcdLibrary_DebuggerStartPolicy;
  1154. +
  1155. +typedef enum _BcdLibrary_ConfigAccessPolicy
  1156. +{
  1157. +    /// <summary>
  1158. +    /// Access to PCI configuration space through the memory-mapped region is allowed.
  1159. +    /// </summary>
  1160. +    ConfigAccessPolicyDefault,
  1161. +    /// <summary>
  1162. +    /// Access to PCI configuration space through the memory-mapped region is not allowed.
  1163. +    /// This setting is used for platforms that implement memory-mapped configuration space incorrectly.
  1164. +    /// The CFC/CF8 access mechanism can be used to access configuration space on these platforms.
  1165. +    /// </summary>
  1166. +    ConfigAccessPolicyDisallowMmConfig
  1167. +} BcdLibrary_ConfigAccessPolicy;
  1168. +
  1169. +typedef enum _BcdLibrary_UxDisplayMessageType
  1170. +{
  1171. +    DisplayMessageTypeDefault = 0,
  1172. +    DisplayMessageTypeResume = 1,
  1173. +    DisplayMessageTypeHyperV = 2,
  1174. +    DisplayMessageTypeRecovery = 3,
  1175. +    DisplayMessageTypeStartupRepair = 4,
  1176. +    DisplayMessageTypeSystemImageRecovery = 5,
  1177. +    DisplayMessageTypeCommandPrompt = 6,
  1178. +    DisplayMessageTypeSystemRestore = 7,
  1179. +    DisplayMessageTypePushButtonReset = 8,
  1180. +} BcdLibrary_UxDisplayMessageType;
  1181. +
  1182. +typedef enum BcdLibrary_SafeBoot
  1183. +{
  1184. +    SafemodeMinimal = 0,
  1185. +    SafemodeNetwork = 1,
  1186. +    SafemodeDsRepair = 2
  1187. +} BcdLibrary_SafeBoot;
  1188. +
  1189. +// BcdLibraryElementTypes based on geoffchappell: https://www.geoffchappell.com/notes/windows/boot/bcd/elements.htm (dmex)
  1190. +typedef enum _BcdLibraryElementTypes
  1191. +{
  1192. +    /// <summary>
  1193. +    /// Device on which a boot environment application resides.
  1194. +    /// </summary>
  1195. +    /// <remarks>0x11000001</remarks>
  1196. +    BcdLibraryDevice_ApplicationDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 1),
  1197. +    /// <summary>
  1198. +    /// Path to a boot environment application.
  1199. +    /// </summary>
  1200. +    /// <remarks>0x12000002</remarks>
  1201. +    BcdLibraryString_ApplicationPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 2),
  1202. +    /// <summary>
  1203. +    /// Display name of the boot environment application.
  1204. +    /// </summary>
  1205. +    /// <remarks>0x12000004</remarks>
  1206. +    BcdLibraryString_Description = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 4),
  1207. +    /// <summary>
  1208. +    /// Preferred locale, in RFC 3066 format.
  1209. +    /// </summary>
  1210. +    /// <remarks>0x12000005</remarks>
  1211. +    BcdLibraryString_PreferredLocale = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 5),
  1212. +    /// <summary>
  1213. +    /// List of BCD objects from which the current object should inherit elements.
  1214. +    /// </summary>
  1215. +    /// <remarks>0x14000006</remarks>
  1216. +    BcdLibraryObjectList_InheritedObjects = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 6),
  1217. +    /// <summary>
  1218. +    /// Maximum physical address a boot environment application should recognize. All memory above this address is ignored.
  1219. +    /// </summary>
  1220. +    /// <remarks>0x15000007</remarks>
  1221. +    BcdLibraryInteger_TruncatePhysicalMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 7),
  1222. +    /// <summary>
  1223. +    /// List of boot environment applications to be executed if the associated application fails. The applications are executed in the order they appear in this list.
  1224. +    /// </summary>
  1225. +    /// <remarks>0x14000008</remarks>
  1226. +    BcdLibraryObjectList_RecoverySequence = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_OBJECTLIST, 8),
  1227. +    /// <summary>
  1228. +    /// Indicates whether the recovery sequence executes automatically if the boot application fails. Otherwise, the recovery sequence only runs on demand.
  1229. +    /// </summary>
  1230. +    /// <remarks>0x16000009</remarks>
  1231. +    BcdLibraryBoolean_AutoRecoveryEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 9),
  1232. +    /// <summary>
  1233. +    /// List of page frame numbers describing faulty memory in the system.
  1234. +    /// </summary>
  1235. +    /// <remarks>0x1700000A</remarks>
  1236. +    BcdLibraryIntegerList_BadMemoryList = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGERLIST, 10),
  1237. +    /// <summary>
  1238. +    /// If TRUE, indicates that a boot application can use memory listed in the BcdLibraryIntegerList_BadMemoryList.
  1239. +    /// </summary>
  1240. +    /// <remarks>0x1600000B</remarks>
  1241. +    BcdLibraryBoolean_AllowBadMemoryAccess = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 11),
  1242. +    /// <summary>
  1243. +    /// Indicates how the first megabyte of memory is to be used. The Integer property is one of the values from the BcdLibrary_FirstMegabytePolicy enumeration.
  1244. +    /// </summary>
  1245. +    /// <remarks>0x1500000C</remarks>
  1246. +    BcdLibraryInteger_FirstMegabytePolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 12),
  1247. +    /// <summary>
  1248. +    /// Relocates physical memory on certain AMD processors.
  1249. +    /// This value is not used in Windows 8 or Windows Server 2012.
  1250. +    /// </summary>
  1251. +    /// <remarks>0x1500000D</remarks>
  1252. +    BcdLibraryInteger_RelocatePhysicalMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 13),
  1253. +    /// <summary>
  1254. +    /// Specifies a minimum physical address to use in the boot environment.
  1255. +    /// </summary>
  1256. +    /// <remarks>0x1500000E</remarks>
  1257. +    BcdLibraryInteger_AvoidLowPhysicalMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 14),
  1258. +    /// <summary>
  1259. +    ///
  1260. +    /// </summary>
  1261. +    /// <remarks>0x1600000F</remarks>
  1262. +    BcdLibraryBoolean_TraditionalKsegMappings = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 15),
  1263. +    /// <summary>
  1264. +    /// Indicates whether the boot debugger should be enabled.
  1265. +    /// </summary>
  1266. +    /// <remarks>0x16000010</remarks>
  1267. +    BcdLibraryBoolean_DebuggerEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 16),
  1268. +    /// <summary>
  1269. +    /// Debugger type. The Integer property is one of the values from the BcdLibrary_DebuggerType enumeration.
  1270. +    /// </summary>
  1271. +    /// <remarks>0x15000011</remarks>
  1272. +    BcdLibraryInteger_DebuggerType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 17),
  1273. +    /// <summary>
  1274. +    /// I/O port address for the serial debugger.
  1275. +    /// </summary>
  1276. +    /// <remarks>0x15000012</remarks>
  1277. +    BcdLibraryInteger_SerialDebuggerPortAddress = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 18),
  1278. +    /// <summary>
  1279. +    /// Serial port number for serial debugging.
  1280. +    /// If this value is not specified, the default is specified by the DBGP ACPI table settings.
  1281. +    /// </summary>
  1282. +    /// <remarks>0x15000013</remarks>
  1283. +    BcdLibraryInteger_SerialDebuggerPort = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 19),
  1284. +    /// <summary>
  1285. +    /// Baud rate for serial debugging.
  1286. +    /// </summary>
  1287. +    /// <remarks>0x15000014</remarks>
  1288. +    BcdLibraryInteger_SerialDebuggerBaudRate = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 20),
  1289. +    /// <summary>
  1290. +    /// Channel number for 1394 debugging.
  1291. +    /// </summary>
  1292. +    /// <remarks>0x15000015</remarks>
  1293. +    BcdLibraryInteger_1394DebuggerChannel = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 21),
  1294. +    /// <summary>
  1295. +    /// The target name for the USB debugger. The target name is arbitrary but must match between the debugger and the debug target.
  1296. +    /// </summary>
  1297. +    /// <remarks>0x12000016</remarks>
  1298. +    BcdLibraryString_UsbDebuggerTargetName = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 22),
  1299. +    /// <summary>
  1300. +    /// If TRUE, the debugger will ignore user mode exceptions and only stop for kernel mode exceptions.
  1301. +    /// </summary>
  1302. +    /// <remarks>0x16000017</remarks>
  1303. +    BcdLibraryBoolean_DebuggerIgnoreUsermodeExceptions = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 23),
  1304. +    /// <summary>
  1305. +    /// Indicates the debugger start policy. The Integer property is one of the values from the BcdLibrary_DebuggerStartPolicy enumeration.
  1306. +    /// </summary>
  1307. +    /// <remarks>0x15000018</remarks>
  1308. +    BcdLibraryInteger_DebuggerStartPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 24),
  1309. +    /// <summary>
  1310. +    /// Defines the PCI bus, device, and function numbers of the debugging device. For example, 1.5.0 describes the debugging device on bus 1, device 5, function 0.
  1311. +    /// </summary>
  1312. +    /// <remarks>0x12000019</remarks>
  1313. +    BcdLibraryString_DebuggerBusParameters = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 25),
  1314. +    /// <summary>
  1315. +    /// Defines the host IP address for the network debugger.
  1316. +    /// </summary>
  1317. +    /// <remarks>0x1500001A</remarks>
  1318. +    BcdLibraryInteger_DebuggerNetHostIP = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 26),
  1319. +    /// <summary>
  1320. +    /// Defines the network port for the network debugger.
  1321. +    /// </summary>
  1322. +    /// <remarks>0x1500001B</remarks>
  1323. +    BcdLibraryInteger_DebuggerNetPort = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 27),
  1324. +    /// <summary>
  1325. +    /// Controls the use of DHCP by the network debugger. Setting this to false causes the OS to only use link-local addresses.
  1326. +    /// This value is supported starting in Windows 8 and Windows Server 2012.
  1327. +    /// </summary>
  1328. +    /// <remarks>0x1600001C</remarks>
  1329. +    BcdLibraryBoolean_DebuggerNetDhcp = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 28),
  1330. +    /// <summary>
  1331. +    /// Holds the key used to encrypt the network debug connection.
  1332. +    /// This value is supported starting in Windows 8 and Windows Server 2012.
  1333. +    /// </summary>
  1334. +    /// <remarks>0x1200001D</remarks>
  1335. +    BcdLibraryString_DebuggerNetKey = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 29),
  1336. +    /// <summary>
  1337. +    ///
  1338. +    /// </summary>
  1339. +    /// <remarks>0x1600001E</remarks>
  1340. +    BcdLibraryBoolean_DebuggerNetVM = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 30),
  1341. +    /// <summary>
  1342. +    ///
  1343. +    /// </summary>
  1344. +    /// <remarks>0x1200001F</remarks>
  1345. +    BcdLibraryString_DebuggerNetHostIpv6 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 31),
  1346. +    /// <summary>
  1347. +    /// Indicates whether EMS redirection should be enabled.
  1348. +    /// </summary>
  1349. +    /// <remarks>0x16000020</remarks>
  1350. +    BcdLibraryBoolean_EmsEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 32),
  1351. +    /// <summary>
  1352. +    /// COM port number for EMS redirection.
  1353. +    /// </summary>
  1354. +    /// <remarks>0x15000022</remarks>
  1355. +    BcdLibraryInteger_EmsPort = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 34),
  1356. +    /// <summary>
  1357. +    /// Baud rate for EMS redirection.
  1358. +    /// </summary>
  1359. +    /// <remarks>0x15000023</remarks>
  1360. +    BcdLibraryInteger_EmsBaudRate = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 35),
  1361. +    /// <summary>
  1362. +    /// String that is appended to the load options string passed to the kernel to be consumed by kernel-mode components.
  1363. +    /// This is useful for communicating with kernel-mode components that are not BCD-aware.
  1364. +    /// </summary>
  1365. +    /// <remarks>0x12000030</remarks>
  1366. +    BcdLibraryString_LoadOptionsString = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 48),
  1367. +    /// <summary>
  1368. +    ///
  1369. +    /// </summary>
  1370. +    /// <remarks>0x16000031</remarks>
  1371. +    BcdLibraryBoolean_AttemptNonBcdStart = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 49),
  1372. +    /// <summary>
  1373. +    /// Indicates whether the advanced options boot menu (F8) is displayed.
  1374. +    /// </summary>
  1375. +    /// <remarks>0x16000040</remarks>
  1376. +    BcdLibraryBoolean_DisplayAdvancedOptions = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 64),
  1377. +    /// <summary>
  1378. +    /// Indicates whether the boot options editor is enabled.
  1379. +    /// </summary>
  1380. +    /// <remarks>0x16000041</remarks>
  1381. +    BcdLibraryBoolean_DisplayOptionsEdit = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 65),
  1382. +    /// <summary>
  1383. +    ///
  1384. +    /// </summary>
  1385. +    /// <remarks>0x15000042</remarks>
  1386. +    BcdLibraryInteger_FVEKeyRingAddress = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 66),
  1387. +    /// <summary>
  1388. +    /// Allows a device override for the bootstat.dat log in the boot manager and winload.exe.
  1389. +    /// </summary>
  1390. +    /// <remarks>0x11000043</remarks>
  1391. +    BcdLibraryDevice_BsdLogDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 67),
  1392. +    /// <summary>
  1393. +    /// Allows a path override for the bootstat.dat log file in the boot manager and winload.exe.
  1394. +    /// </summary>
  1395. +    /// <remarks>0x12000044</remarks>
  1396. +    BcdLibraryString_BsdLogPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 68),
  1397. +    /// <summary>
  1398. +    /// Indicates whether graphics mode is disabled and boot applications must use text mode display.
  1399. +    /// </summary>
  1400. +    /// <remarks>0x16000045</remarks>
  1401. +    BcdLibraryBoolean_BsdPreserveLog = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 69),
  1402. +    /// <summary>
  1403. +    ///
  1404. +    /// </summary>
  1405. +    /// <remarks>0x16000046</remarks>
  1406. +    BcdLibraryBoolean_GraphicsModeDisabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 70),
  1407. +    /// <summary>
  1408. +    /// Indicates the access policy for PCI configuration space.
  1409. +    /// </summary>
  1410. +    /// <remarks>0x15000047</remarks>
  1411. +    BcdLibraryInteger_ConfigAccessPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 71),
  1412. +    /// <summary>
  1413. +    /// Disables integrity checks.
  1414. +    /// Cannot be set when secure boot is enabled.
  1415. +    /// This value is ignored by Windows 7 and Windows 8.
  1416. +    /// </summary>
  1417. +    /// <remarks>0x16000048</remarks>
  1418. +    BcdLibraryBoolean_DisableIntegrityChecks = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 72),
  1419. +    /// <summary>
  1420. +    /// Indicates whether the test code signing certificate is supported.
  1421. +    /// </summary>
  1422. +    /// <remarks>0x16000049</remarks>
  1423. +    BcdLibraryBoolean_AllowPrereleaseSignatures = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 73),
  1424. +    /// <summary>
  1425. +    /// Overrides the default location of the boot fonts.
  1426. +    /// </summary>
  1427. +    /// <remarks>0x1200004A</remarks>
  1428. +    BcdLibraryString_FontPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 74),
  1429. +    /// <summary>
  1430. +    ///
  1431. +    /// </summary>
  1432. +    /// <remarks>0x1500004B</remarks>
  1433. +    BcdLibraryInteger_SiPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 75),
  1434. +    /// <summary>
  1435. +    /// This value (if present) should not be modified.
  1436. +    /// </summary>
  1437. +    /// <remarks>0x1500004C</remarks>
  1438. +    BcdLibraryInteger_FveBandId = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 76),
  1439. +    /// <summary>
  1440. +    /// Specifies that legacy BIOS systems should use INT 16h Function 10h for console input instead of INT 16h Function 0h.
  1441. +    /// </summary>
  1442. +    /// <remarks>0x16000050</remarks>
  1443. +    BcdLibraryBoolean_ConsoleExtendedInput = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 80),
  1444. +    /// <summary>
  1445. +    ///
  1446. +    /// </summary>
  1447. +    /// <remarks>0x15000051</remarks>
  1448. +    BcdLibraryInteger_InitialConsoleInput = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 81),
  1449. +    /// <summary>
  1450. +    /// Forces a specific graphics resolution at boot.
  1451. +    /// Possible values include GraphicsResolution1024x768 (0), GraphicsResolution800x600 (1), and GraphicsResolution1024x600 (2).
  1452. +    /// </summary>
  1453. +    /// <remarks>0x15000052</remarks>
  1454. +    BcdLibraryInteger_GraphicsResolution = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 82),
  1455. +    /// <summary>
  1456. +    /// If enabled, specifies that boot error screens are not shown when OS launch errors occur, and the system is reset rather than exiting directly back to the firmware.
  1457. +    /// </summary>
  1458. +    /// <remarks>0x16000053</remarks>
  1459. +    BcdLibraryBoolean_RestartOnFailure = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 83),
  1460. +    /// <summary>
  1461. +    /// Forces highest available graphics resolution at boot.
  1462. +    /// This value can only be used on UEFI systems.
  1463. +    /// This value is supported starting in Windows 8 and Windows Server 2012.
  1464. +    /// </summary>
  1465. +    /// <remarks>0x16000054</remarks>
  1466. +    BcdLibraryBoolean_GraphicsForceHighestMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 84),
  1467. +    /// <summary>
  1468. +    /// This setting is used to differentiate between the Windows 7 and Windows 8 implementations of UEFI.
  1469. +    /// Do not modify this setting.
  1470. +    /// If this setting is removed from a Windows 8 installation, it will not boot.
  1471. +    /// If this setting is added to a Windows 7 installation, it will not boot.
  1472. +    /// </summary>
  1473. +    /// <remarks>0x16000060</remarks>
  1474. +    BcdLibraryBoolean_IsolatedExecutionContext = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 96),
  1475. +    /// <summary>
  1476. +    /// This setting disables the progress bar and default Windows logo. If a custom text string has been defined, it is also disabled by this setting.
  1477. +    /// The Integer property is one of the values from the BcdLibrary_UxDisplayMessageType enumeration.
  1478. +    /// </summary>
  1479. +    /// <remarks>0x15000065</remarks>
  1480. +    BcdLibraryInteger_BootUxDisplayMessage = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 101),
  1481. +    /// <summary>
  1482. +    ///
  1483. +    /// </summary>
  1484. +    /// <remarks>0x15000066</remarks>
  1485. +    BcdLibraryInteger_BootUxDisplayMessageOverride = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 102),
  1486. +    /// <summary>
  1487. +    /// This setting disables the boot logo.
  1488. +    /// </summary>
  1489. +    /// <remarks>0x16000067</remarks>
  1490. +    BcdLibraryBoolean_BootUxLogoDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 103),
  1491. +    /// <summary>
  1492. +    /// This setting disables the boot status text.
  1493. +    /// </summary>
  1494. +    /// <remarks>0x16000068</remarks>
  1495. +    BcdLibraryBoolean_BootUxTextDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 104),
  1496. +    /// <summary>
  1497. +    /// This setting disables the boot progress bar.
  1498. +    /// </summary>
  1499. +    /// <remarks>0x16000069</remarks>
  1500. +    BcdLibraryBoolean_BootUxProgressDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 105),
  1501. +    /// <summary>
  1502. +    /// This setting disables the boot transition fading.
  1503. +    /// </summary>
  1504. +    /// <remarks>0x1600006A</remarks>
  1505. +    BcdLibraryBoolean_BootUxFadeDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 106),
  1506. +    /// <summary>
  1507. +    ///
  1508. +    /// </summary>
  1509. +    /// <remarks>0x1600006B</remarks>
  1510. +    BcdLibraryBoolean_BootUxReservePoolDebug = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 107),
  1511. +    /// <summary>
  1512. +    ///
  1513. +    /// </summary>
  1514. +    /// <remarks>0x1600006C</remarks>
  1515. +    BcdLibraryBoolean_BootUxDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 108),
  1516. +    /// <summary>
  1517. +    ///
  1518. +    /// </summary>
  1519. +    /// <remarks>0x1500006D</remarks>
  1520. +    BcdLibraryInteger_BootUxFadeFrames = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 109),
  1521. +    /// <summary>
  1522. +    ///
  1523. +    /// </summary>
  1524. +    /// <remarks>0x1600006E</remarks>
  1525. +    BcdLibraryBoolean_BootUxDumpStats = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 110),
  1526. +    /// <summary>
  1527. +    ///
  1528. +    /// </summary>
  1529. +    /// <remarks>0x1600006F</remarks>
  1530. +    BcdLibraryBoolean_BootUxShowStats = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 111),
  1531. +    /// <summary>
  1532. +    ///
  1533. +    /// </summary>
  1534. +    /// <remarks>0x16000071</remarks>
  1535. +    BcdLibraryBoolean_MultiBootSystem = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 113),
  1536. +    /// <summary>
  1537. +    ///
  1538. +    /// </summary>
  1539. +    /// <remarks>0x16000072</remarks>
  1540. +    BcdLibraryBoolean_ForceNoKeyboard = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 114),
  1541. +    /// <summary>
  1542. +    ///
  1543. +    /// </summary>
  1544. +    /// <remarks>0x15000073</remarks>
  1545. +    BcdLibraryInteger_AliasWindowsKey = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 115),
  1546. +    /// <summary>
  1547. +    /// Disables the 1-minute timer that triggers shutdown on boot error screens, and the F8 menu, on UEFI systems.
  1548. +    /// </summary>
  1549. +    /// <remarks>0x16000074</remarks>
  1550. +    BcdLibraryBoolean_BootShutdownDisabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 116),
  1551. +    /// <summary>
  1552. +    ///
  1553. +    /// </summary>
  1554. +    /// <remarks>0x15000075</remarks>
  1555. +    BcdLibraryInteger_PerformanceFrequency = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 117),
  1556. +    /// <summary>
  1557. +    ///
  1558. +    /// </summary>
  1559. +    /// <remarks>0x15000076</remarks>
  1560. +    BcdLibraryInteger_SecurebootRawPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 118),
  1561. +    /// <summary>
  1562. +    /// Indicates whether or not an in-memory BCD setting passed between boot apps will trigger BitLocker recovery.
  1563. +    /// This value should not be modified as it could trigger a BitLocker recovery action.
  1564. +    /// </summary>
  1565. +    /// <remarks>0x17000077</remarks>
  1566. +    BcdLibraryIntegerList_AllowedInMemorySettings = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 119),
  1567. +    /// <summary>
  1568. +    ///
  1569. +    /// </summary>
  1570. +    /// <remarks>0x15000079</remarks>
  1571. +    BcdLibraryInteger_BootUxBitmapTransitionTime = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 121),
  1572. +    /// <summary>
  1573. +    ///
  1574. +    /// </summary>
  1575. +    /// <remarks>0x1600007A</remarks>
  1576. +    BcdLibraryBoolean_TwoBootImages = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 122),
  1577. +    /// <summary>
  1578. +    /// Force the use of FIPS cryptography checks on boot applications.
  1579. +    /// BcdLibraryBoolean_ForceFipsCrypto is documented with wrong value 0x16000079
  1580. +    /// </summary>
  1581. +    /// <remarks>0x1600007B</remarks>
  1582. +    BcdLibraryBoolean_ForceFipsCrypto = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 123),
  1583. +    /// <summary>
  1584. +    ///
  1585. +    /// </summary>
  1586. +    /// <remarks>0x1500007D</remarks>
  1587. +    BcdLibraryInteger_BootErrorUx = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 125),
  1588. +    /// <summary>
  1589. +    ///
  1590. +    /// </summary>
  1591. +    /// <remarks>0x1600007E</remarks>
  1592. +    BcdLibraryBoolean_AllowFlightSignatures = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 126),
  1593. +    /// <summary>
  1594. +    ///
  1595. +    /// </summary>
  1596. +    /// <remarks>0x1500007F</remarks>
  1597. +    BcdLibraryInteger_BootMeasurementLogFormat = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 127),
  1598. +    /// <summary>
  1599. +    ///
  1600. +    /// </summary>
  1601. +    /// <remarks>0x15000080</remarks>
  1602. +    BcdLibraryInteger_DisplayRotation = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 128),
  1603. +    /// <summary>
  1604. +    ///
  1605. +    /// </summary>
  1606. +    /// <remarks>0x15000081</remarks>
  1607. +    BcdLibraryInteger_LogControl = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 129),
  1608. +    /// <summary>
  1609. +    ///
  1610. +    /// </summary>
  1611. +    /// <remarks>0x16000082</remarks>
  1612. +    BcdLibraryBoolean_NoFirmwareSync = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 130),
  1613. +    /// <summary>
  1614. +    ///
  1615. +    /// </summary>
  1616. +    /// <remarks>0x11000084</remarks>
  1617. +    BcdLibraryDevice_WindowsSystemDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 132),
  1618. +    /// <summary>
  1619. +    ///
  1620. +    /// </summary>
  1621. +    /// <remarks>0x16000087</remarks>
  1622. +    BcdLibraryBoolean_NumLockOn = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 135),
  1623. +    /// <summary>
  1624. +    ///
  1625. +    /// </summary>
  1626. +    /// <remarks>0x12000088</remarks>
  1627. +    BcdLibraryString_AdditionalCiPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_LIBRARY, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 136),
  1628. +} BcdLibraryElementTypes;
  1629. +
  1630. +typedef enum _BcdTemplateElementTypes
  1631. +{
  1632. +    /// <summary>
  1633. +    ///
  1634. +    /// </summary>
  1635. +    /// <remarks>0x45000001</remarks>
  1636. +    BcdSetupInteger_DeviceType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 1),
  1637. +    /// <summary>
  1638. +    ///
  1639. +    /// </summary>
  1640. +    /// <remarks>0x42000002</remarks>
  1641. +    BcdSetupString_ApplicationRelativePath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 2),
  1642. +    /// <summary>
  1643. +    ///
  1644. +    /// </summary>
  1645. +    /// <remarks>0x42000003</remarks>
  1646. +    BcdSetupString_RamdiskDeviceRelativePath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 3),
  1647. +    /// <summary>
  1648. +    ///
  1649. +    /// </summary>
  1650. +    /// <remarks>0x46000004</remarks>
  1651. +    BcdSetupBoolean_OmitOsLoaderElements = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 4),
  1652. +    /// <summary>
  1653. +    ///
  1654. +    /// </summary>
  1655. +    /// <remarks>0x47000006</remarks>
  1656. +    BcdSetupIntegerList_ElementsToMigrateList = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_INTEGERLIST, 6),
  1657. +    /// <summary>
  1658. +    ///
  1659. +    /// </summary>
  1660. +    /// <remarks>0x46000010</remarks>
  1661. +    BcdSetupBoolean_RecoveryOs = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_SETUPTEMPLATE, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 16),
  1662. +} BcdTemplateElementTypes;
  1663. +
  1664. +/// <summary>
  1665. +/// Specifies the no-execute page protection policies.
  1666. +/// </summary>
  1667. +typedef enum _BcdOSLoader_NxPolicy
  1668. +{
  1669. +    /// <summary>
  1670. +    /// The no-execute page protection is off by default.
  1671. +    /// </summary>
  1672. +    NxPolicyOptIn = 0,
  1673. +    /// <summary>
  1674. +    /// The no-execute page protection is on by default.
  1675. +    /// </summary>
  1676. +    NxPolicyOptOut = 1,
  1677. +    /// <summary>
  1678. +    /// The no-execute page protection is always off.
  1679. +    /// </summary>
  1680. +    NxPolicyAlwaysOff = 2,
  1681. +    /// <summary>
  1682. +    /// The no-execute page protection is always on.
  1683. +    /// </summary>
  1684. +    NxPolicyAlwaysOn = 3
  1685. +} BcdOSLoader_NxPolicy;
  1686. +
  1687. +/// <summary>
  1688. +/// Specifies the Physical Address Extension (PAE) policies.
  1689. +/// </summary>
  1690. +typedef enum _BcdOSLoader_PAEPolicy
  1691. +{
  1692. +    /// <summary>
  1693. +    /// Enable PAE if hot-pluggable memory is defined above 4GB.
  1694. +    /// </summary>
  1695. +    PaePolicyDefault = 0,
  1696. +    /// <summary>
  1697. +    /// PAE is enabled.
  1698. +    /// </summary>
  1699. +    PaePolicyForceEnable = 1,
  1700. +    /// <summary>
  1701. +    /// PAE is disabled.
  1702. +    /// </summary>
  1703. +    PaePolicyForceDisable = 2
  1704. +} BcdOSLoader_PAEPolicy;
  1705. +
  1706. +typedef enum _BcdOSLoader_BootStatusPolicy
  1707. +{
  1708. +    /// <summary>
  1709. +    /// Display all boot failures.
  1710. +    /// </summary>
  1711. +    BootStatusPolicyDisplayAllFailures = 0,
  1712. +    /// <summary>
  1713. +    /// Ignore all boot failures.
  1714. +    /// </summary>
  1715. +    BootStatusPolicyIgnoreAllFailures = 1,
  1716. +    /// <summary>
  1717. +    /// Ignore all shutdown failures.
  1718. +    /// </summary>
  1719. +    BootStatusPolicyIgnoreShutdownFailures = 2,
  1720. +    /// <summary>
  1721. +    /// Ignore all boot failures.
  1722. +    /// </summary>
  1723. +    BootStatusPolicyIgnoreBootFailures = 3,
  1724. +    /// <summary>
  1725. +    /// Ignore checkpoint failures.
  1726. +    /// </summary>
  1727. +    BootStatusPolicyIgnoreCheckpointFailures = 4,
  1728. +    /// <summary>
  1729. +    /// Display shutdown failures.
  1730. +    /// </summary>
  1731. +    BootStatusPolicyDisplayShutdownFailures = 5,
  1732. +    /// <summary>
  1733. +    /// Display boot failures.
  1734. +    /// </summary>
  1735. +    BootStatusPolicyDisplayBootFailures = 6,
  1736. +    /// <summary>
  1737. +    /// Display checkpoint failures.
  1738. +    /// </summary>
  1739. +    BootStatusPolicyDisplayCheckpointFailures = 7
  1740. +} BcdOSLoaderBootStatusPolicy;
  1741. +
  1742. +// BcdOSLoaderElementTypes based on geoffchappell: https://www.geoffchappell.com/notes/windows/boot/bcd/elements.htm (dmex)
  1743. +typedef enum _BcdOSLoaderElementTypes
  1744. +{
  1745. +    /// <summary>
  1746. +    /// The device on which the operating system resides.
  1747. +    /// </summary>
  1748. +    /// <remarks>0x21000001</remarks>
  1749. +    BcdOSLoaderDevice_OSDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 1),
  1750. +    /// <summary>
  1751. +    /// The file path to the operating system (%SystemRoot% minus the volume).
  1752. +    /// </summary>
  1753. +    /// <remarks>0x22000002</remarks>
  1754. +    BcdOSLoaderString_SystemRoot = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 2),
  1755. +    /// <summary>
  1756. +    /// The resume application associated with the operating system.
  1757. +    /// </summary>
  1758. +    /// <remarks>0x23000003</remarks>
  1759. +    BcdOSLoaderObject_AssociatedResumeObject = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_OBJECT, 3),
  1760. +    /// <summary>
  1761. +    ///
  1762. +    /// </summary>
  1763. +    /// <remarks>0x26000004</remarks>
  1764. +    BcdOSLoaderBoolean_StampDisks = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 4),
  1765. +    /// <summary>
  1766. +    /// Indicates whether the operating system loader should determine the kernel and HAL to load based on the platform features.
  1767. +    /// </summary>
  1768. +    /// <remarks>0x26000010</remarks>
  1769. +    BcdOSLoaderBoolean_DetectKernelAndHal = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 16),
  1770. +    /// <summary>
  1771. +    /// The kernel to be loaded by the operating system loader. This value overrides the default kernel.
  1772. +    /// </summary>
  1773. +    /// <remarks>0x22000011</remarks>
  1774. +    BcdOSLoaderString_KernelPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 17),
  1775. +    /// <summary>
  1776. +    /// The HAL to be loaded by the operating system loader. This value overrides the default HAL.
  1777. +    /// </summary>
  1778. +    /// <remarks>0x22000012</remarks>
  1779. +    BcdOSLoaderString_HalPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 18),
  1780. +    /// <summary>
  1781. +    /// The transport DLL to be loaded by the operating system loader. This value overrides the default Kdcom.dll.
  1782. +    /// </summary>
  1783. +    /// <remarks>0x22000013</remarks>
  1784. +    BcdOSLoaderString_DbgTransportPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 19),
  1785. +    /// <summary>
  1786. +    /// The no-execute page protection policy. The Integer property is one of the values from the BcdOSLoader_NxPolicy enumeration.
  1787. +    /// </summary>
  1788. +    /// <remarks>0x25000020</remarks>
  1789. +    BcdOSLoaderInteger_NxPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 32),
  1790. +    /// <summary>
  1791. +    /// The Physical Address Extension (PAE) policy. The Integer property is one of the values from the BcdOSLoader_PAEPolicy enumeration.
  1792. +    /// </summary>
  1793. +    /// <remarks>0x25000021</remarks>
  1794. +    BcdOSLoaderInteger_PAEPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 33),
  1795. +    /// <summary>
  1796. +    /// Indicates that the system should be started in Windows Preinstallation Environment (Windows PE) mode.
  1797. +    /// </summary>
  1798. +    /// <remarks>0x26000022</remarks>
  1799. +    BcdOSLoaderBoolean_WinPEMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 34),
  1800. +    /// <summary>
  1801. +    /// Indicates that the system should not automatically reboot when it crashes.
  1802. +    /// </summary>
  1803. +    /// <remarks>0x26000024</remarks>
  1804. +    BcdOSLoaderBoolean_DisableCrashAutoReboot = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 36),
  1805. +    /// <summary>
  1806. +    /// Indicates that the system should use the last-known good settings.
  1807. +    /// </summary>
  1808. +    /// <remarks>0x26000025</remarks>
  1809. +    BcdOSLoaderBoolean_UseLastGoodSettings = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 37),
  1810. +    /// <summary>
  1811. +    ///
  1812. +    /// </summary>
  1813. +    /// <remarks>0x26000026</remarks>
  1814. +    BcdOSLoaderBoolean_DisableCodeIntegrityChecks = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 38),
  1815. +    /// <summary>
  1816. +    /// Indicates whether the test code signing certificate is supported.
  1817. +    /// </summary>
  1818. +    /// <remarks>0x26000027</remarks>
  1819. +    BcdOSLoaderBoolean_AllowPrereleaseSignatures = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 39),
  1820. +    /// <summary>
  1821. +    /// Indicates whether the system should utilize the first 4GB of physical memory.
  1822. +    /// This option requires 5GB of physical memory, and on x86 systems it requires PAE to be enabled.
  1823. +    /// </summary>
  1824. +    /// <remarks>0x26000030</remarks>
  1825. +    BcdOSLoaderBoolean_NoLowMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 48),
  1826. +    /// <summary>
  1827. +    /// The amount of memory the system should ignore.
  1828. +    /// </summary>
  1829. +    /// <remarks>0x25000031</remarks>
  1830. +    BcdOSLoaderInteger_RemoveMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 49),
  1831. +    /// <summary>
  1832. +    /// The amount of memory that should be utilized by the process address space, in bytes.
  1833. +    /// This value should be between 2GB and 3GB.
  1834. +    /// Increasing this value from the default 2GB decreases the amount of virtual address space available to the system and device drivers.
  1835. +    /// </summary>
  1836. +    /// <remarks>0x25000032</remarks>
  1837. +    BcdOSLoaderInteger_IncreaseUserVa = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 50),
  1838. +    /// <summary>
  1839. +    ///
  1840. +    /// </summary>
  1841. +    /// <remarks>0x25000033</remarks>
  1842. +    BcdOSLoaderInteger_PerformaceDataMemory = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 51),
  1843. +    /// <summary>
  1844. +    /// Indicates whether the system should use the standard VGA display driver instead of a high-performance display driver.
  1845. +    /// </summary>
  1846. +    /// <remarks>0x26000040</remarks>
  1847. +    BcdOSLoaderBoolean_UseVgaDriver = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 64),
  1848. +    /// <summary>
  1849. +    /// Indicates whether the system should initialize the VGA driver responsible for displaying simple graphics during the boot process.
  1850. +    /// If not, there is no display is presented during the boot process.
  1851. +    /// </summary>
  1852. +    /// <remarks>0x26000041</remarks>
  1853. +    BcdOSLoaderBoolean_DisableBootDisplay = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 65),
  1854. +    /// <summary>
  1855. +    /// Indicates whether the VGA driver should avoid VESA BIOS calls.
  1856. +    /// Note This value is ignored by Windows 8 and Windows Server 2012.
  1857. +    /// </summary>
  1858. +    /// <remarks>0x26000042</remarks>
  1859. +    BcdOSLoaderBoolean_DisableVesaBios = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 66),
  1860. +    /// <summary>
  1861. +    /// Disables the use of VGA modes in the OS.
  1862. +    /// </summary>
  1863. +    /// <remarks>0x26000043</remarks>
  1864. +    BcdOSLoaderBoolean_DisableVgaMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 67),
  1865. +    /// <summary>
  1866. +    /// Indicates that cluster-mode APIC addressing should be utilized, and the value is the maximum number of processors per cluster.
  1867. +    /// </summary>
  1868. +    /// <remarks>0x25000050</remarks>
  1869. +    BcdOSLoaderInteger_ClusterModeAddressing = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 80),
  1870. +    /// <summary>
  1871. +    /// Indicates whether to enable physical-destination mode for all APIC messages.
  1872. +    /// </summary>
  1873. +    /// <remarks>0x26000051</remarks>
  1874. +    BcdOSLoaderBoolean_UsePhysicalDestination = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 81),
  1875. +    /// <summary>
  1876. +    /// The maximum number of APIC clusters that should be used by cluster-mode addressing.
  1877. +    /// </summary>
  1878. +    /// <remarks>0x25000052</remarks>
  1879. +    BcdOSLoaderInteger_RestrictApicCluster = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 82),
  1880. +    /// <summary>
  1881. +    ///
  1882. +    /// </summary>
  1883. +    /// <remarks>0x22000053</remarks>
  1884. +    BcdOSLoaderString_OSLoaderTypeEVStore = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 83),
  1885. +    /// <summary>
  1886. +    /// Used to force legacy APIC mode, even if the processors and chipset support extended APIC mode.
  1887. +    /// </summary>
  1888. +    /// <remarks>0x26000054</remarks>
  1889. +    BcdOSLoaderBoolean_UseLegacyApicMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 84),
  1890. +    /// <summary>
  1891. +    /// Enables the use of extended APIC mode, if supported.
  1892. +    /// Zero (0) indicates default behavior, one (1) indicates that extended APIC mode is disabled, and two (2) indicates that extended APIC mode is enabled.
  1893. +    /// The system defaults to using extended APIC mode if available.
  1894. +    /// </summary>
  1895. +    /// <remarks>0x25000055</remarks>
  1896. +    BcdOSLoaderInteger_X2ApicPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 85),
  1897. +    /// <summary>
  1898. +    /// Indicates whether the operating system should initialize or start non-boot processors.
  1899. +    /// </summary>
  1900. +    /// <remarks>0x26000060</remarks>
  1901. +    BcdOSLoaderBoolean_UseBootProcessorOnly = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 96),
  1902. +    /// <summary>
  1903. +    /// The maximum number of processors that can be utilized by the system; all other processors are ignored.
  1904. +    /// </summary>
  1905. +    /// <remarks>0x25000061</remarks>
  1906. +    BcdOSLoaderInteger_NumberOfProcessors = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 97),
  1907. +    /// <summary>
  1908. +    /// Indicates whether the system should use the maximum number of processors.
  1909. +    /// </summary>
  1910. +    /// <remarks>0x26000062</remarks>
  1911. +    BcdOSLoaderBoolean_ForceMaximumProcessors = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 98),
  1912. +    /// <summary>
  1913. +    /// Indicates whether processor specific configuration flags are to be used.
  1914. +    /// </summary>
  1915. +    /// <remarks>0x25000063</remarks>
  1916. +    BcdOSLoaderBoolean_ProcessorConfigurationFlags = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 99),
  1917. +    /// <summary>
  1918. +    /// Maximizes the number of groups created when assigning nodes to processor groups.
  1919. +    /// </summary>
  1920. +    /// <remarks>0x26000064</remarks>
  1921. +    BcdOSLoaderBoolean_MaximizeGroupsCreated = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 100),
  1922. +    /// <summary>
  1923. +    /// This setting makes drivers group aware and can be used to determine improper group usage.
  1924. +    /// </summary>
  1925. +    /// <remarks>0x26000065</remarks>
  1926. +    BcdOSLoaderBoolean_ForceGroupAwareness = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 101),
  1927. +    /// <summary>
  1928. +    /// Specifies the size of all processor groups. Must be set to a power of 2.
  1929. +    /// </summary>
  1930. +    /// <remarks>0x25000066</remarks>
  1931. +    BcdOSLoaderInteger_GroupSize = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 102),
  1932. +    /// <summary>
  1933. +    /// Indicates whether the system should use I/O and IRQ resources created by the system firmware instead of using dynamically configured resources.
  1934. +    /// </summary>
  1935. +    /// <remarks>0x26000070</remarks>
  1936. +    BcdOSLoaderInteger_UseFirmwarePciSettings = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 112),
  1937. +    /// <summary>
  1938. +    /// The PCI Message Signaled Interrupt (MSI) policy. Zero (0) indicates default, and one (1) indicates that MSI interrupts are disabled.
  1939. +    /// </summary>
  1940. +    /// <remarks>0x25000071</remarks>
  1941. +    BcdOSLoaderInteger_MsiPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 113),
  1942. +    /// <summary>
  1943. +    /// Undocumented. Zero (0) indicates default, and one (1) indicates that PCI Express is forcefully disabled.
  1944. +    /// </summary>
  1945. +    /// <remarks>0x25000072</remarks>
  1946. +    BcdOSLoaderInteger_PciExpressPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 114),
  1947. +    /// <summary>
  1948. +    /// The Integer property is one of the values from the BcdLibrary_SafeBoot enumeration.
  1949. +    /// </summary>
  1950. +    /// <remarks>0x25000080</remarks>
  1951. +    BcdOSLoaderInteger_SafeBoot = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 128),
  1952. +    /// <summary>
  1953. +    /// Indicates whether the system should use the shell specified under the following registry key instead of the default shell:
  1954. +    /// HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\AlternateShell.
  1955. +    /// </summary>
  1956. +    /// <remarks>0x26000081</remarks>
  1957. +    BcdOSLoaderBoolean_SafeBootAlternateShell = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 129),
  1958. +    /// <summary>
  1959. +    /// Indicates whether the system should write logging information to %SystemRoot%\Ntbtlog.txt during initialization.
  1960. +    /// </summary>
  1961. +    /// <remarks>0x26000090</remarks>
  1962. +    BcdOSLoaderBoolean_BootLogInitialization = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 144),
  1963. +    /// <summary>
  1964. +    /// Indicates whether the system should display verbose information.
  1965. +    /// </summary>
  1966. +    /// <remarks>0x26000091</remarks>
  1967. +    BcdOSLoaderBoolean_VerboseObjectLoadMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 145),
  1968. +    /// <summary>
  1969. +    /// Indicates whether the kernel debugger should be enabled using the settings in the inherited debugger object.
  1970. +    /// </summary>
  1971. +    /// <remarks>0x260000A0</remarks>
  1972. +    BcdOSLoaderBoolean_KernelDebuggerEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 160),
  1973. +    /// <summary>
  1974. +    /// Indicates whether the HAL should call DbgBreakPoint at the start of HalInitSystem for phase 0 initialization of the kernel.
  1975. +    /// </summary>
  1976. +    /// <remarks>0x260000A1</remarks>
  1977. +    BcdOSLoaderBoolean_DebuggerHalBreakpoint = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 161),
  1978. +    /// <summary>
  1979. +    /// Forces the use of the platform clock as the system's performance counter.
  1980. +    /// </summary>
  1981. +    /// <remarks>0x260000A2</remarks>
  1982. +    BcdOSLoaderBoolean_UsePlatformClock = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 162),
  1983. +    /// <summary>
  1984. +    /// Forces the OS to assume the presence of legacy PC devices like CMOS and keyboard controllers.
  1985. +    /// This value should only be used for debugging.
  1986. +    /// </summary>
  1987. +    /// <remarks>0x260000A3</remarks>
  1988. +    BcdOSLoaderBoolean_ForceLegacyPlatform = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 163),
  1989. +    /// <summary>
  1990. +    ///
  1991. +    /// </summary>
  1992. +    /// <remarks>0x260000A4</remarks>
  1993. +    BcdOSLoaderBoolean_UsePlatformTick = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 164),
  1994. +    /// <summary>
  1995. +    ///
  1996. +    /// </summary>
  1997. +    /// <remarks>0x260000A5</remarks>
  1998. +    BcdOSLoaderBoolean_DisableDynamicTick = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 165),
  1999. +    /// <summary>
  2000. +    /// Controls the TSC synchronization policy. Possible values include default (0), legacy (1), or enhanced (2).
  2001. +    /// This value is supported starting in Windows 8 and Windows Server 2012.
  2002. +    /// </summary>
  2003. +    /// <remarks>0x250000A6</remarks>
  2004. +    BcdOSLoaderInteger_TscSyncPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 166),
  2005. +    /// <summary>
  2006. +    /// Indicates whether EMS should be enabled in the kernel.
  2007. +    /// </summary>
  2008. +    /// <remarks>0x260000B0</remarks>
  2009. +    BcdOSLoaderBoolean_EmsEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 176),
  2010. +    /// <summary>
  2011. +    ///
  2012. +    /// </summary>
  2013. +    /// <remarks>0x250000C0</remarks>
  2014. +    BcdOSLoaderInteger_ForceFailure = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 192),
  2015. +    /// <summary>
  2016. +    /// Indicates the driver load failure policy. Zero (0) indicates that a failed driver load is fatal and the boot will not continue,
  2017. +    /// one (1) indicates that the standard error control is used.
  2018. +    /// </summary>
  2019. +    /// <remarks>0x250000C1</remarks>
  2020. +    BcdOSLoaderInteger_DriverLoadFailurePolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 193),
  2021. +    /// <summary>
  2022. +    /// Defines the type of boot menus the system will use. Possible values include menupolicylegacy (0) or menupolicystandard (1).
  2023. +    /// The default value is menupolicylegacy (0).
  2024. +    /// </summary>
  2025. +    /// <remarks>0x250000C2</remarks>
  2026. +    BcdOSLoaderInteger_BootMenuPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 194),
  2027. +    /// <summary>
  2028. +    /// Controls whether the system boots to the legacy menu (F8 menu) on the next boot.
  2029. +    /// Note This value is supported starting in Windows 8 and Windows Server 2012.
  2030. +    /// </summary>
  2031. +    /// <remarks>0x260000C3</remarks>
  2032. +    BcdOSLoaderBoolean_AdvancedOptionsOneTime = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 195),
  2033. +    /// <summary>
  2034. +    ///
  2035. +    /// </summary>
  2036. +    /// <remarks>0x260000C4</remarks>
  2037. +    BcdOSLoaderBoolean_OptionsEditOneTime = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 196),
  2038. +    /// <summary>
  2039. +    /// The boot status policy. The Integer property is one of the values from the BcdOSLoaderBootStatusPolicy enumeration
  2040. +    /// </summary>
  2041. +    /// <remarks>0x250000E0</remarks>
  2042. +    BcdOSLoaderInteger_BootStatusPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 224),
  2043. +    /// <summary>
  2044. +    /// The OS loader removes this entry for security reasons. This option can only be triggered by using the F8 menu; a user must be physically present to trigger this option.
  2045. +    /// This value is supported starting in Windows 8 and Windows Server 2012.
  2046. +    /// </summary>
  2047. +    /// <remarks>0x260000E1</remarks>
  2048. +    BcdOSLoaderBoolean_DisableElamDrivers = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 225),
  2049. +    /// <summary>
  2050. +    /// Controls the hypervisor launch type. Options are HyperVisorLaunchOff (0) and HypervisorLaunchAuto (1).
  2051. +    /// </summary>
  2052. +    /// <remarks>0x250000F0</remarks>
  2053. +    BcdOSLoaderInteger_HypervisorLaunchType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 240),
  2054. +    /// <summary>
  2055. +    ///
  2056. +    /// </summary>
  2057. +    /// <remarks>0x250000F1</remarks>
  2058. +    BcdOSLoaderString_HypervisorPath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 241),
  2059. +    /// <summary>
  2060. +    /// Controls whether the hypervisor debugger is enabled.
  2061. +    /// </summary>
  2062. +    /// <remarks>0x260000F2</remarks>
  2063. +    BcdOSLoaderBoolean_HypervisorDebuggerEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 242),
  2064. +    /// <summary>
  2065. +    /// Controls the hypervisor debugger type. Can be set to SERIAL (0), 1394 (1), or NET (2).
  2066. +    /// </summary>
  2067. +    /// <remarks>0x250000F3</remarks>
  2068. +    BcdOSLoaderInteger_HypervisorDebuggerType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 243),
  2069. +    /// <summary>
  2070. +    /// Specifies the serial port number for serial debugging.
  2071. +    /// </summary>
  2072. +    /// <remarks>0x250000F4</remarks>
  2073. +    BcdOSLoaderInteger_HypervisorDebuggerPortNumber = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 244),
  2074. +    /// <summary>
  2075. +    /// Specifies the baud rate for serial debugging.
  2076. +    /// </summary>
  2077. +    /// <remarks>0x250000F5</remarks>
  2078. +    BcdOSLoaderInteger_HypervisorDebuggerBaudrate = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 245),
  2079. +    /// <summary>
  2080. +    /// Specifies the channel number for 1394 debugging.
  2081. +    /// </summary>
  2082. +    /// <remarks>0x250000F6</remarks>
  2083. +    BcdOSLoaderInteger_HypervisorDebugger1394Channel = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 246),
  2084. +    /// <summary>
  2085. +    /// Values are Disabled (0), Basic (1), and Standard (2).
  2086. +    /// </summary>
  2087. +    /// <remarks>0x250000F7</remarks>
  2088. +    BcdOSLoaderInteger_BootUxPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 247),
  2089. +    /// <summary>
  2090. +    ///
  2091. +    /// </summary>
  2092. +    /// <remarks>0x220000F8</remarks>
  2093. +    BcdOSLoaderInteger_HypervisorSlatDisabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 248),
  2094. +    /// <summary>
  2095. +    /// Defines the PCI bus, device, and function numbers of the debugging device used with the hypervisor.
  2096. +    /// For example, 1.5.0 describes the debugging device on bus 1, device 5, function 0.
  2097. +    /// </summary>
  2098. +    /// <remarks>0x220000F9</remarks>
  2099. +    BcdOSLoaderString_HypervisorDebuggerBusParams = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 249),
  2100. +    /// <summary>
  2101. +    ///
  2102. +    /// </summary>
  2103. +    /// <remarks>0x250000FA</remarks>
  2104. +    BcdOSLoaderInteger_HypervisorNumProc = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 250),
  2105. +    /// <summary>
  2106. +    ///
  2107. +    /// </summary>
  2108. +    /// <remarks>0x250000FB</remarks>
  2109. +    BcdOSLoaderInteger_HypervisorRootProcPerNode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 251),
  2110. +    /// <summary>
  2111. +    ///
  2112. +    /// </summary>
  2113. +    /// <remarks>0x260000FC</remarks>
  2114. +    BcdOSLoaderBoolean_HypervisorUseLargeVTlb = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 252),
  2115. +    /// <summary>
  2116. +    ///
  2117. +    /// </summary>
  2118. +    /// <remarks>0x250000FD</remarks>
  2119. +    BcdOSLoaderInteger_HypervisorDebuggerNetHostIp = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 253),
  2120. +    /// <summary>
  2121. +    ///
  2122. +    /// </summary>
  2123. +    /// <remarks>0x250000FE</remarks>
  2124. +    BcdOSLoaderInteger_HypervisorDebuggerNetHostPort = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 254),
  2125. +    /// <summary>
  2126. +    ///
  2127. +    /// </summary>
  2128. +    /// <remarks>0x250000FF</remarks>
  2129. +    BcdOSLoaderInteger_HypervisorDebuggerPages = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 255),
  2130. +    /// <summary>
  2131. +    ///
  2132. +    /// </summary>
  2133. +    /// <remarks>0x25000100</remarks>
  2134. +    BcdOSLoaderInteger_TpmBootEntropyPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 256),
  2135. +    /// <summary>
  2136. +    ///
  2137. +    /// </summary>
  2138. +    /// <remarks>0x22000110</remarks>
  2139. +    BcdOSLoaderString_HypervisorDebuggerNetKey = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 272),
  2140. +    /// <summary>
  2141. +    ///
  2142. +    /// </summary>
  2143. +    /// <remarks>0x22000112</remarks>
  2144. +    BcdOSLoaderString_HypervisorProductSkuType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 274),
  2145. +    /// <summary>
  2146. +    ///
  2147. +    /// </summary>
  2148. +    /// <remarks>0x22000113</remarks>
  2149. +    BcdOSLoaderInteger_HypervisorRootProc = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 275),
  2150. +    /// <summary>
  2151. +    ///
  2152. +    /// </summary>
  2153. +    /// <remarks>0x26000114</remarks>
  2154. +    BcdOSLoaderBoolean_HypervisorDebuggerNetDhcp = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 276),
  2155. +    /// <summary>
  2156. +    ///
  2157. +    /// </summary>
  2158. +    /// <remarks>0x25000115</remarks>
  2159. +    BcdOSLoaderInteger_HypervisorIommuPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 277),
  2160. +    /// <summary>
  2161. +    ///
  2162. +    /// </summary>
  2163. +    /// <remarks>0x26000116</remarks>
  2164. +    BcdOSLoaderBoolean_HypervisorUseVApic = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 278),
  2165. +    /// <summary>
  2166. +    ///
  2167. +    /// </summary>
  2168. +    /// <remarks>0x22000117</remarks>
  2169. +    BcdOSLoaderString_HypervisorLoadOptions = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 279),
  2170. +    /// <summary>
  2171. +    ///
  2172. +    /// </summary>
  2173. +    /// <remarks>0x25000118</remarks>
  2174. +    BcdOSLoaderInteger_HypervisorMsrFilterPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 280),
  2175. +    /// <summary>
  2176. +    ///
  2177. +    /// </summary>
  2178. +    /// <remarks>0x25000119</remarks>
  2179. +    BcdOSLoaderInteger_HypervisorMmioNxPolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 281),
  2180. +    /// <summary>
  2181. +    ///
  2182. +    /// </summary>
  2183. +    /// <remarks>0x2500011A</remarks>
  2184. +    BcdOSLoaderInteger_HypervisorSchedulerType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 282),
  2185. +    /// <summary>
  2186. +    ///
  2187. +    /// </summary>
  2188. +    /// <remarks>0x2200011B</remarks>
  2189. +    BcdOSLoaderString_HypervisorRootProcNumaNodes = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 283),
  2190. +    /// <summary>
  2191. +    ///
  2192. +    /// </summary>
  2193. +    /// <remarks>0x2500011C</remarks>
  2194. +    BcdOSLoaderInteger_HypervisorPerfmon = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 284),
  2195. +    /// <summary>
  2196. +    ///
  2197. +    /// </summary>
  2198. +    /// <remarks>0x2500011D</remarks>
  2199. +    BcdOSLoaderInteger_HypervisorRootProcPerCore = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 285),
  2200. +    /// <summary>
  2201. +    ///
  2202. +    /// </summary>
  2203. +    /// <remarks>0x2200011E</remarks>
  2204. +    BcdOSLoaderString_HypervisorRootProcNumaNodeLps = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 286),
  2205. +    /// <summary>
  2206. +    ///
  2207. +    /// </summary>
  2208. +    /// <remarks>0x25000120</remarks>
  2209. +    BcdOSLoaderInteger_XSavePolicy = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 288),
  2210. +    /// <summary>
  2211. +    ///
  2212. +    /// </summary>
  2213. +    /// <remarks>0x25000121</remarks>
  2214. +    BcdOSLoaderInteger_XSaveAddFeature0 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 289),
  2215. +    /// <summary>
  2216. +    ///
  2217. +    /// </summary>
  2218. +    /// <remarks>0x25000122</remarks>
  2219. +    BcdOSLoaderInteger_XSaveAddFeature1 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 290),
  2220. +    /// <summary>
  2221. +    ///
  2222. +    /// </summary>
  2223. +    /// <remarks>0x25000123</remarks>
  2224. +    BcdOSLoaderInteger_XSaveAddFeature2 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 291),
  2225. +    /// <summary>
  2226. +    ///
  2227. +    /// </summary>
  2228. +    /// <remarks>0x25000124</remarks>
  2229. +    BcdOSLoaderInteger_XSaveAddFeature3 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 292),
  2230. +    /// <summary>
  2231. +    ///
  2232. +    /// </summary>
  2233. +    /// <remarks>0x25000125</remarks>
  2234. +    BcdOSLoaderInteger_XSaveAddFeature4 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 293),
  2235. +    /// <summary>
  2236. +    ///
  2237. +    /// </summary>
  2238. +    /// <remarks>0x25000126</remarks>
  2239. +    BcdOSLoaderInteger_XSaveAddFeature5 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 294),
  2240. +    /// <summary>
  2241. +    ///
  2242. +    /// </summary>
  2243. +    /// <remarks>0x25000127</remarks>
  2244. +    BcdOSLoaderInteger_XSaveAddFeature6 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 295),
  2245. +    /// <summary>
  2246. +    ///
  2247. +    /// </summary>
  2248. +    /// <remarks>0x25000128</remarks>
  2249. +    BcdOSLoaderInteger_XSaveAddFeature7 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 296),
  2250. +    /// <summary>
  2251. +    ///
  2252. +    /// </summary>
  2253. +    /// <remarks>0x25000129</remarks>
  2254. +    BcdOSLoaderInteger_XSaveRemoveFeature = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 297),
  2255. +    /// <summary>
  2256. +    ///
  2257. +    /// </summary>
  2258. +    /// <remarks>0x2500012A</remarks>
  2259. +    BcdOSLoaderInteger_XSaveProcessorsMask = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 298),
  2260. +    /// <summary>
  2261. +    ///
  2262. +    /// </summary>
  2263. +    /// <remarks>0x2500012B</remarks>
  2264. +    BcdOSLoaderInteger_XSaveDisable = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 299),
  2265. +    /// <summary>
  2266. +    ///
  2267. +    /// </summary>
  2268. +    /// <remarks>0x2500012C</remarks>
  2269. +    BcdOSLoaderInteger_KernelDebuggerType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 300),
  2270. +    /// <summary>
  2271. +    ///
  2272. +    /// </summary>
  2273. +    /// <remarks>0x2200012D</remarks>
  2274. +    BcdOSLoaderString_KernelDebuggerBusParameters = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 301),
  2275. +    /// <summary>
  2276. +    ///
  2277. +    /// </summary>
  2278. +    /// <remarks>0x2500012E</remarks>
  2279. +    BcdOSLoaderInteger_KernelDebuggerPortAddress = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 302),
  2280. +    /// <summary>
  2281. +    ///
  2282. +    /// </summary>
  2283. +    /// <remarks>0x2500012F</remarks>
  2284. +    BcdOSLoaderInteger_KernelDebuggerPortNumber = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 303),
  2285. +    /// <summary>
  2286. +    ///
  2287. +    /// </summary>
  2288. +    /// <remarks>0x25000130</remarks>
  2289. +    BcdOSLoaderInteger_ClaimedTpmCounter = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 304),
  2290. +    /// <summary>
  2291. +    ///
  2292. +    /// </summary>
  2293. +    /// <remarks>0x25000131</remarks>
  2294. +    BcdOSLoaderInteger_KernelDebugger1394Channel = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 305),
  2295. +    /// <summary>
  2296. +    ///
  2297. +    /// </summary>
  2298. +    /// <remarks>0x22000132</remarks>
  2299. +    BcdOSLoaderString_KernelDebuggerUsbTargetname = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 306),
  2300. +    /// <summary>
  2301. +    ///
  2302. +    /// </summary>
  2303. +    /// <remarks>0x25000133</remarks>
  2304. +    BcdOSLoaderInteger_KernelDebuggerNetHostIp = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 307),
  2305. +    /// <summary>
  2306. +    ///
  2307. +    /// </summary>
  2308. +    /// <remarks>0x25000134</remarks>
  2309. +    BcdOSLoaderInteger_KernelDebuggerNetHostPort = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 308),
  2310. +    /// <summary>
  2311. +    ///
  2312. +    /// </summary>
  2313. +    /// <remarks>0x26000135</remarks>
  2314. +    BcdOSLoaderBoolean_KernelDebuggerNetDhcp = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 309),
  2315. +    /// <summary>
  2316. +    ///
  2317. +    /// </summary>
  2318. +    /// <remarks>0x22000136</remarks>
  2319. +    BcdOSLoaderString_KernelDebuggerNetKey = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 310),
  2320. +    /// <summary>
  2321. +    ///
  2322. +    /// </summary>
  2323. +    /// <remarks>0x22000137</remarks>
  2324. +    BcdOSLoaderString_IMCHiveName = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 311),
  2325. +    /// <summary>
  2326. +    ///
  2327. +    /// </summary>
  2328. +    /// <remarks>0x21000138</remarks>
  2329. +    BcdOSLoaderDevice_IMCDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 312),
  2330. +    /// <summary>
  2331. +    ///
  2332. +    /// </summary>
  2333. +    /// <remarks>0x25000139</remarks>
  2334. +    BcdOSLoaderInteger_KernelDebuggerBaudrate = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 313),
  2335. +    /// <summary>
  2336. +    ///
  2337. +    /// </summary>
  2338. +    /// <remarks>0x22000140</remarks>
  2339. +    BcdOSLoaderString_ManufacturingMode = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 320),
  2340. +    /// <summary>
  2341. +    ///
  2342. +    /// </summary>
  2343. +    /// <remarks>0x26000141</remarks>
  2344. +    BcdOSLoaderBoolean_EventLoggingEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 321),
  2345. +    /// <summary>
  2346. +    ///
  2347. +    /// </summary>
  2348. +    /// <remarks>0x25000142</remarks>
  2349. +    BcdOSLoaderInteger_VsmLaunchType = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 322),
  2350. +    /// <summary>
  2351. +    /// Undocumented. Zero (0) indicates default, one (1) indicates that disabled and two (2) indicates strict mode.
  2352. +    /// </summary>
  2353. +    /// <remarks>0x25000144</remarks>
  2354. +    BcdOSLoaderInteger_HypervisorEnforcedCodeIntegrity = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_INTEGER, 324),
  2355. +    /// <summary>
  2356. +    ///
  2357. +    /// </summary>
  2358. +    /// <remarks>0x26000145</remarks>
  2359. +    BcdOSLoaderBoolean_DtraceEnabled = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_BOOLEAN, 325),
  2360. +    /// <summary>
  2361. +    ///
  2362. +    /// </summary>
  2363. +    /// <remarks>0x21000150</remarks>
  2364. +    BcdOSLoaderDevice_SystemDataDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 336),
  2365. +    /// <summary>
  2366. +    ///
  2367. +    /// </summary>
  2368. +    /// <remarks>0x21000151</remarks>
  2369. +    BcdOSLoaderDevice_OsArcDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 337),
  2370. +    /// <summary>
  2371. +    ///
  2372. +    /// </summary>
  2373. +    /// <remarks>0x21000153</remarks>
  2374. +    BcdOSLoaderDevice_OsDataDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 339),
  2375. +    /// <summary>
  2376. +    ///
  2377. +    /// </summary>
  2378. +    /// <remarks>0x21000154</remarks>
  2379. +    BcdOSLoaderDevice_BspDevice = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 340),
  2380. +    /// <summary>
  2381. +    ///
  2382. +    /// </summary>
  2383. +    /// <remarks>0x21000155</remarks>
  2384. +    BcdOSLoaderDevice_BspFilepath = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_DEVICE, 341),
  2385. +    /// <summary>
  2386. +    ///
  2387. +    /// </summary>
  2388. +    /// <remarks>0x22000156</remarks>
  2389. +    BcdOSLoaderString_KernelDebuggerNetHostIpv6 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 342),
  2390. +    /// <summary>
  2391. +    ///
  2392. +    /// </summary>
  2393. +    /// <remarks>0x22000161</remarks>
  2394. +    BcdOSLoaderString_HypervisorDebuggerNetHostIpv6 = MAKE_BCDE_DATA_TYPE(BCD_ELEMENT_DATATYPE_CLASS_APPLICATION, BCD_ELEMENT_DATATYPE_FORMAT_STRING, 353),
  2395. +} BcdOSLoaderElementTypes;
  2396. +
  2397. +#ifdef __cplusplus
  2398. +}
  2399. +#endif
  2400. +
  2401. +#endif
  2402. diff --git a/phnt/include/ntdbg.h b/phnt/include/ntdbg.h
  2403. index 8406b46a..7a70c0e7 100644
  2404. --- a/phnt/include/ntdbg.h
  2405. +++ b/phnt/include/ntdbg.h
  2406. @@ -222,7 +222,7 @@ typedef struct _DBGUI_WAIT_STATE_CHANGE
  2407.  typedef enum _DEBUGOBJECTINFOCLASS
  2408.  {
  2409.      DebugObjectUnusedInformation,
  2410. -    DebugObjectKillProcessOnExitInformation,
  2411. +    DebugObjectKillProcessOnExitInformation, // s: ULONG
  2412.      MaxDebugObjectInfoClass
  2413.  } DEBUGOBJECTINFOCLASS, *PDEBUGOBJECTINFOCLASS;
  2414.  
  2415. diff --git a/phnt/include/ntexapi.h b/phnt/include/ntexapi.h
  2416. index 6d31bdb9..c888cfcc 100644
  2417. --- a/phnt/include/ntexapi.h
  2418. +++ b/phnt/include/ntexapi.h
  2419. @@ -1312,9 +1312,9 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2420.      SystemVerifierInformation, // q: SYSTEM_VERIFIER_INFORMATION; s (requires SeDebugPrivilege)
  2421.      SystemVerifierThunkExtend, // s (kernel-mode only)
  2422.      SystemSessionProcessInformation, // q: SYSTEM_SESSION_PROCESS_INFORMATION
  2423. -    SystemLoadGdiDriverInSystemSpace, // s (kernel-mode only) (same as SystemLoadGdiDriverInformation)
  2424. +    SystemLoadGdiDriverInSystemSpace, // s: SYSTEM_GDI_DRIVER_INFORMATION (kernel-mode only) (same as SystemLoadGdiDriverInformation)
  2425.      SystemNumaProcessorMap, // q: SYSTEM_NUMA_INFORMATION
  2426. -    SystemPrefetcherInformation, // q: PREFETCHER_INFORMATION; s: PREFETCHER_INFORMATION // PfSnQueryPrefetcherInformation
  2427. +    SystemPrefetcherInformation, // q; s: PREFETCHER_INFORMATION // PfSnQueryPrefetcherInformation
  2428.      SystemExtendedProcessInformation, // q: SYSTEM_PROCESS_INFORMATION
  2429.      SystemRecommendedSharedDataAlignment, // q: ULONG // KeGetRecommendedSharedDataAlignment
  2430.      SystemComPlusPackage, // q; s: ULONG
  2431. @@ -1329,8 +1329,8 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2432.      SystemSessionMappedViewInformation, // q: SYSTEM_SESSION_MAPPED_VIEW_INFORMATION
  2433.      SystemHotpatchInformation, // q; s: SYSTEM_HOTPATCH_CODE_INFORMATION
  2434.      SystemObjectSecurityMode, // q: ULONG // 70
  2435. -    SystemWatchdogTimerHandler, // s (kernel-mode only)
  2436. -    SystemWatchdogTimerInformation, // q (kernel-mode only); s (kernel-mode only)
  2437. +    SystemWatchdogTimerHandler, // s: SYSTEM_WATCHDOG_HANDLER_INFORMATION // (kernel-mode only)
  2438. +    SystemWatchdogTimerInformation, // q: SYSTEM_WATCHDOG_TIMER_INFORMATION // (kernel-mode only)
  2439.      SystemLogicalProcessorInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION
  2440.      SystemWow64SharedInformationObsolete, // not implemented
  2441.      SystemRegisterFirmwareTableInformationHandler, // s: SYSTEM_FIRMWARE_TABLE_HANDLER // (kernel-mode only)
  2442. @@ -1349,17 +1349,17 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2443.      SystemProcessIdInformation, // q: SYSTEM_PROCESS_ID_INFORMATION
  2444.      SystemErrorPortInformation, // s (requires SeTcbPrivilege)
  2445.      SystemBootEnvironmentInformation, // q: SYSTEM_BOOT_ENVIRONMENT_INFORMATION // 90
  2446. -    SystemHypervisorInformation,
  2447. +    SystemHypervisorInformation, // q: SYSTEM_HYPERVISOR_QUERY_INFORMATION
  2448.      SystemVerifierInformationEx, // q; s: SYSTEM_VERIFIER_INFORMATION_EX
  2449.      SystemTimeZoneInformation, // q; s: RTL_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege)
  2450.      SystemImageFileExecutionOptionsInformation, // s: SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION (requires SeTcbPrivilege)
  2451. -    SystemCoverageInformation, // q; s // name:wow64:whNT32QuerySystemCoverageInformation; ExpCovQueryInformation (requires SeDebugPrivilege)
  2452. +    SystemCoverageInformation, // q: COVERAGE_MODULES s: COVERAGE_MODULE_REQUEST // ExpCovQueryInformation (requires SeDebugPrivilege)
  2453.      SystemPrefetchPatchInformation, // SYSTEM_PREFETCH_PATCH_INFORMATION
  2454.      SystemVerifierFaultsInformation, // s: SYSTEM_VERIFIER_FAULTS_INFORMATION (requires SeDebugPrivilege)
  2455.      SystemSystemPartitionInformation, // q: SYSTEM_SYSTEM_PARTITION_INFORMATION
  2456.      SystemSystemDiskInformation, // q: SYSTEM_SYSTEM_DISK_INFORMATION
  2457.      SystemProcessorPerformanceDistribution, // q: SYSTEM_PROCESSOR_PERFORMANCE_DISTRIBUTION // 100
  2458. -    SystemNumaProximityNodeInformation,
  2459. +    SystemNumaProximityNodeInformation, // q; s: SYSTEM_NUMA_PROXIMITY_MAP
  2460.      SystemDynamicTimeZoneInformation, // q; s: RTL_DYNAMIC_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege)
  2461.      SystemCodeIntegrityInformation, // q: SYSTEM_CODEINTEGRITY_INFORMATION // SeCodeIntegrityQueryInformation
  2462.      SystemProcessorMicrocodeUpdateInformation, // s: SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION
  2463. @@ -1389,7 +1389,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2464.      SystemBadPageInformation,
  2465.      SystemProcessorProfileControlArea, // q; s: SYSTEM_PROCESSOR_PROFILE_CONTROL_AREA
  2466.      SystemCombinePhysicalMemoryInformation, // s: MEMORY_COMBINE_INFORMATION, MEMORY_COMBINE_INFORMATION_EX, MEMORY_COMBINE_INFORMATION_EX2 // 130
  2467. -    SystemEntropyInterruptTimingInformation,
  2468. +    SystemEntropyInterruptTimingInformation, // q; s: SYSTEM_ENTROPY_TIMING_INFORMATION
  2469.      SystemConsoleInformation, // q: SYSTEM_CONSOLE_INFORMATION
  2470.      SystemPlatformBinaryInformation, // q: SYSTEM_PLATFORM_BINARY_INFORMATION (requires SeTcbPrivilege)
  2471.      SystemPolicyInformation, // q: SYSTEM_POLICY_INFORMATION
  2472. @@ -1411,10 +1411,10 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2473.      SystemBootMetadataInformation, // 150
  2474.      SystemSoftRebootInformation, // q: ULONG
  2475.      SystemElamCertificateInformation, // s: SYSTEM_ELAM_CERTIFICATE_INFORMATION
  2476. -    SystemOfflineDumpConfigInformation,
  2477. +    SystemOfflineDumpConfigInformation, // q: OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2
  2478.      SystemProcessorFeaturesInformation, // q: SYSTEM_PROCESSOR_FEATURES_INFORMATION
  2479.      SystemRegistryReconciliationInformation, // s: NULL (requires admin) (flushes registry hives)
  2480. -    SystemEdidInformation,
  2481. +    SystemEdidInformation, // q: SYSTEM_EDID_INFORMATION
  2482.      SystemManufacturingInformation, // q: SYSTEM_MANUFACTURING_INFORMATION // since THRESHOLD
  2483.      SystemEnergyEstimationConfigInformation, // q: SYSTEM_ENERGY_ESTIMATION_CONFIG_INFORMATION
  2484.      SystemHypervisorDetailInformation, // q: SYSTEM_HYPERVISOR_DETAIL_INFORMATION
  2485. @@ -1470,7 +1470,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
  2486.      SystemCodeIntegritySyntheticCacheInformation,
  2487.      SystemFeatureConfigurationInformation, // SYSTEM_FEATURE_CONFIGURATION_INFORMATION // since 20H1 // 210
  2488.      SystemFeatureConfigurationSectionInformation, // SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION
  2489. -    SystemFeatureUsageSubscriptionInformation,
  2490. +    SystemFeatureUsageSubscriptionInformation, // SYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS
  2491.      SystemSecureSpeculationControlInformation, // SECURE_SPECULATION_CONTROL_INFORMATION
  2492.      SystemSpacesBootInformation, // since 20H2
  2493.      SystemFwRamdiskInformation, // SYSTEM_FIRMWARE_RAMDISK_INFORMATION
  2494. @@ -2428,6 +2428,7 @@ typedef struct _SYSTEM_VERIFIER_INFORMATION
  2495.      SIZE_T PeakNonPagedPoolUsageInBytes;
  2496.  } SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
  2497.  
  2498. +// private
  2499.  typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
  2500.  {
  2501.      ULONG SessionId;
  2502. @@ -2435,6 +2436,17 @@ typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
  2503.      PVOID Buffer;
  2504.  } SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
  2505.  
  2506. +// private
  2507. +typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
  2508. +{
  2509. +    UNICODE_STRING DriverName;
  2510. +    PVOID ImageAddress;
  2511. +    PVOID SectionPointer;
  2512. +    PVOID EntryPoint;
  2513. +    PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
  2514. +    ULONG ImageLength;
  2515. +} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
  2516. +
  2517.  // geoffchappell
  2518.  #ifdef _WIN64
  2519.  #define MAXIMUM_NODE_COUNT 0x40
  2520. @@ -2561,6 +2573,48 @@ typedef struct _SYSTEM_SESSION_MAPPED_VIEW_INFORMATION
  2521.      SIZE_T NumberOfBytesAvailableContiguous;
  2522.  } SYSTEM_SESSION_MAPPED_VIEW_INFORMATION, *PSYSTEM_SESSION_MAPPED_VIEW_INFORMATION;
  2523.  
  2524. +typedef enum _WATCHDOG_HANDLER_ACTION
  2525. +{
  2526. +    WdActionSetTimeoutValue,
  2527. +    WdActionQueryTimeoutValue,
  2528. +    WdActionResetTimer,
  2529. +    WdActionStopTimer,
  2530. +    WdActionStartTimer,
  2531. +    WdActionSetTriggerAction,
  2532. +    WdActionQueryTriggerAction,
  2533. +    WdActionQueryState
  2534. +} WATCHDOG_HANDLER_ACTION;
  2535. +
  2536. +typedef NTSTATUS (*PSYSTEM_WATCHDOG_HANDLER)(_In_ WATCHDOG_HANDLER_ACTION Action, _In_ PVOID Context, _Inout_ PULONG DataValue, _In_ BOOLEAN NoLocks);
  2537. +
  2538. +// private
  2539. +typedef struct _SYSTEM_WATCHDOG_HANDLER_INFORMATION
  2540. +{
  2541. +    PSYSTEM_WATCHDOG_HANDLER WdHandler;
  2542. +    PVOID Context;
  2543. +} SYSTEM_WATCHDOG_HANDLER_INFORMATION, *PSYSTEM_WATCHDOG_HANDLER_INFORMATION;
  2544. +
  2545. +typedef enum _WATCHDOG_INFORMATION_CLASS
  2546. +{
  2547. +    WdInfoTimeoutValue = 0,
  2548. +    WdInfoResetTimer = 1,
  2549. +    WdInfoStopTimer = 2,
  2550. +    WdInfoStartTimer = 3,
  2551. +    WdInfoTriggerAction = 4,
  2552. +    WdInfoState = 5,
  2553. +    WdInfoTriggerReset = 6,
  2554. +    WdInfoNop = 7,
  2555. +    WdInfoGeneratedLastReset = 8,
  2556. +    WdInfoInvalid = 9,
  2557. +} WATCHDOG_INFORMATION_CLASS;
  2558. +
  2559. +// private
  2560. +typedef struct _SYSTEM_WATCHDOG_TIMER_INFORMATION
  2561. +{
  2562. +    WATCHDOG_INFORMATION_CLASS WdInfoClass;
  2563. +    ULONG DataValue;
  2564. +} SYSTEM_WATCHDOG_TIMER_INFORMATION, PSYSTEM_WATCHDOG_TIMER_INFORMATION;
  2565. +
  2566.  #if (PHNT_MODE != PHNT_MODE_KERNEL)
  2567.  // private
  2568.  typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
  2569. @@ -2677,6 +2731,16 @@ typedef struct _SYSTEM_PROCESS_ID_INFORMATION
  2570.      UNICODE_STRING ImageName;
  2571.  } SYSTEM_PROCESS_ID_INFORMATION, *PSYSTEM_PROCESS_ID_INFORMATION;
  2572.  
  2573. +// private
  2574. +typedef struct _SYSTEM_HYPERVISOR_QUERY_INFORMATION
  2575. +{
  2576. +    BOOLEAN HypervisorConnected;
  2577. +    BOOLEAN HypervisorDebuggingEnabled;
  2578. +    BOOLEAN HypervisorPresent;
  2579. +    BOOLEAN Spare0[5];
  2580. +    ULONGLONG EnabledEnlightenments;
  2581. +} SYSTEM_HYPERVISOR_QUERY_INFORMATION, *PSYSTEM_HYPERVISOR_QUERY_INFORMATION;
  2582. +
  2583.  // private
  2584.  typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
  2585.  {
  2586. @@ -2706,6 +2770,44 @@ typedef struct _SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION
  2587.      ULONG FlagsToDisable;
  2588.  } SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION, *PSYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION;
  2589.  
  2590. +// private
  2591. +typedef enum _COVERAGE_REQUEST_CODES
  2592. +{
  2593. +    CoverageAllModules = 0,
  2594. +    CoverageSearchByHash = 1,
  2595. +    CoverageSearchByName = 2
  2596. +} COVERAGE_REQUEST_CODES;
  2597. +
  2598. +// private
  2599. +typedef struct _COVERAGE_MODULE_REQUEST
  2600. +{
  2601. +    COVERAGE_REQUEST_CODES RequestType;
  2602. +    union
  2603. +    {
  2604. +        UCHAR MD5Hash[16];
  2605. +        UNICODE_STRING ModuleName;
  2606. +    } SearchInfo;
  2607. +} COVERAGE_MODULE_REQUEST, *PCOVERAGE_MODULE_REQUEST;
  2608. +
  2609. +// private
  2610. +typedef struct _COVERAGE_MODULE_INFO
  2611. +{
  2612. +    ULONG ModuleInfoSize;
  2613. +    ULONG IsBinaryLoaded;
  2614. +    UNICODE_STRING ModulePathName;
  2615. +    ULONG CoverageSectionSize;
  2616. +    UCHAR CoverageSection[1];
  2617. +} COVERAGE_MODULE_INFO, *PCOVERAGE_MODULE_INFO;
  2618. +
  2619. +// private
  2620. +typedef struct _COVERAGE_MODULES
  2621. +{
  2622. +    ULONG ListAndReset;
  2623. +    ULONG NumberOfModules;
  2624. +    COVERAGE_MODULE_REQUEST ModuleRequestInfo;
  2625. +    COVERAGE_MODULE_INFO Modules[1];
  2626. +} COVERAGE_MODULES, *PCOVERAGE_MODULES;
  2627. +
  2628.  // private
  2629.  typedef struct _SYSTEM_PREFETCH_PATCH_INFORMATION
  2630.  {
  2631. @@ -2748,6 +2850,13 @@ typedef struct _SYSTEM_SYSTEM_DISK_INFORMATION
  2632.      UNICODE_STRING SystemDisk;
  2633.  } SYSTEM_SYSTEM_DISK_INFORMATION, *PSYSTEM_SYSTEM_DISK_INFORMATION;
  2634.  
  2635. +// private
  2636. +typedef struct _SYSTEM_NUMA_PROXIMITY_MAP
  2637. +{
  2638. +    ULONG NodeProximityId;
  2639. +    USHORT NodeNumber;
  2640. +} SYSTEM_NUMA_PROXIMITY_MAP, *PSYSTEM_NUMA_PROXIMITY_MAP;
  2641. +
  2642.  // private (Windows 8.1 and above)
  2643.  typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT
  2644.  {
  2645. @@ -2829,43 +2938,77 @@ typedef struct _SYSTEM_VA_LIST_INFORMATION
  2646.  } SYSTEM_VA_LIST_INFORMATION, *PSYSTEM_VA_LIST_INFORMATION;
  2647.  
  2648.  // rev
  2649. -typedef enum _SYSTEM_STORE_INFORMATION_CLASS
  2650. -{
  2651. -    SystemStoreProcessStatsInformation = 2, // (requires SeProfileSingleProcessPrivilege) // SmProcessStatsRequest
  2652. -    SystemStoreProcessListInformation = 5, // SmProcessListRequest
  2653. -    SystemStoreProcessListExInformation = 8, // SmcProcessListRequest
  2654. -    SystemStoreProcessStatsExInformation = 13, // SmcProcessStatsRequest
  2655. -    SystemStoreRegistrationInformation = 15, // SmProcessRegistrationRequest
  2656. -    SystemStoreCompressionInformation = 22, // q: SYSTEM_STORE_COMPRESSION_INFORMATION // SmProcessCompressionInfoRequest
  2657. -    SystemStoreProcessStoreInformation = 23, // SmProcessProcessStoreInfoRequest
  2658. -    SystemStoreMaxInfoClass
  2659. -} SYSTEM_STORE_INFORMATION_CLASS;
  2660. +typedef enum _STORE_INFORMATION_CLASS
  2661. +{
  2662. +    StorePageRequest = 1,
  2663. +    StoreStatsRequest = 2, // (requires SeProfileSingleProcessPrivilege) // SmProcessStatsRequest
  2664. +    StoreCreateRequest = 3,
  2665. +    StoreDeleteRequest = 4,
  2666. +    StoreListRequest = 5, // SmProcessListRequest
  2667. +    Available1 = 6,
  2668. +    StoreEmptyRequest = 7,
  2669. +    CacheListRequest = 8, // SmcProcessListRequest
  2670. +    CacheCreateRequest = 9,
  2671. +    CacheDeleteRequest = 10,
  2672. +    CacheStoreCreateRequest = 11,
  2673. +    CacheStoreDeleteRequest = 12,
  2674. +    CacheStatsRequest = 13, // SmcProcessStatsRequest
  2675. +    Available2 = 14,
  2676. +    RegistrationRequest = 15, // SmProcessRegistrationRequest
  2677. +    GlobalCacheStatsRequest = 16,
  2678. +    StoreResizeRequest = 17,
  2679. +    CacheStoreResizeRequest = 18,
  2680. +    SmConfigRequest = 19,
  2681. +    StoreHighMemoryPriorityRequest = 20, // SM_STORE_HIGH_MEM_PRIORITY_REQUEST
  2682. +    SystemStoreTrimRequest = 21, // SM_SYSTEM_STORE_TRIM_REQUEST
  2683. +    MemCompressionInfoRequest = 22,  // q: SM_MEM_COMPRESSION_INFO_REQUEST // SmProcessCompressionInfoRequest
  2684. +    ProcessStoreInfoRequest = 23, // SmProcessProcessStoreInfoRequest
  2685. +    StoreInformationMax
  2686. +} STORE_INFORMATION_CLASS;
  2687.  
  2688.  // rev
  2689.  #define SYSTEM_STORE_INFORMATION_VERSION 1
  2690.  
  2691.  // rev
  2692. -typedef struct _SYSTEM_STORE_INFORMATION
  2693. +typedef struct _STORE_INFORMATION
  2694.  {
  2695.      _In_ ULONG Version;
  2696. -    _In_ SYSTEM_STORE_INFORMATION_CLASS StoreInformationClass;
  2697. +    _In_ STORE_INFORMATION_CLASS StoreInformationClass;
  2698.      _Inout_ PVOID Data;
  2699.      _Inout_ ULONG Length;
  2700. -} SYSTEM_STORE_INFORMATION, *PSYSTEM_STORE_INFORMATION;
  2701. +} STORE_INFORMATION, *PSTORE_INFORMATION;
  2702. +
  2703. +// rev
  2704. +typedef struct _SM_STORE_HIGH_MEM_PRIORITY_REQUEST
  2705. +{
  2706. +    ULONG Version : 8;
  2707. +    ULONG SetHighMemoryPriority : 1;
  2708. +    ULONG Spare : 23;
  2709. +    HANDLE ProcessHandle;
  2710. +} SM_STORE_HIGH_MEM_PRIORITY_REQUEST, *PSM_STORE_HIGH_MEM_PRIORITY_REQUEST;
  2711. +
  2712. +// rev
  2713. +typedef struct _SM_SYSTEM_STORE_TRIM_REQUEST
  2714. +{
  2715. +    ULONG Version : 8;
  2716. +    ULONG Spare : 24;
  2717. +    SIZE_T PagesToTrim; // ULONG?
  2718. +} SM_SYSTEM_STORE_TRIM_REQUEST, *PSM_SYSTEM_STORE_TRIM_REQUEST;
  2719.  
  2720.  // rev
  2721.  #define SYSTEM_STORE_COMPRESSION_INFORMATION_VERSION 3
  2722.  
  2723.  // rev
  2724. -typedef struct _SYSTEM_STORE_COMPRESSION_INFORMATION
  2725. +typedef struct _SM_MEM_COMPRESSION_INFO_REQUEST
  2726.  {
  2727. -    ULONG Version;
  2728. +    ULONG Version : 8;
  2729. +    ULONG Spare : 24;
  2730.      ULONG CompressionPid;
  2731. -    ULONGLONG CompressionWorkingSetSize;
  2732. -    ULONGLONG CompressSize;
  2733. -    ULONGLONG CompressedSize;
  2734. -    ULONGLONG NonCompressedSize;
  2735. -} SYSTEM_STORE_COMPRESSION_INFORMATION, *PSYSTEM_STORE_COMPRESSION_INFORMATION;
  2736. +    ULONG WorkingSetSize; // ULONGLONG?
  2737. +    ULONGLONG TotalDataCompressed;
  2738. +    ULONGLONG TotalCompressedSize;
  2739. +    ULONGLONG TotalUniqueDataCompressed;
  2740. +} SM_MEM_COMPRESSION_INFO_REQUEST, *PSM_MEM_COMPRESSION_INFO_REQUEST;
  2741.  
  2742.  // private
  2743.  typedef struct _SYSTEM_REGISTRY_APPEND_STRING_PARAMETERS
  2744. @@ -3127,6 +3270,14 @@ typedef struct _MEMORY_COMBINE_INFORMATION_EX2
  2745.      HANDLE ProcessHandle;
  2746.  } MEMORY_COMBINE_INFORMATION_EX2, *PMEMORY_COMBINE_INFORMATION_EX2;
  2747.  
  2748. +// private
  2749. +typedef struct _SYSTEM_ENTROPY_TIMING_INFORMATION
  2750. +{
  2751. +    VOID (NTAPI *EntropyRoutine)(PVOID, ULONG);
  2752. +    VOID (NTAPI *InitializationRoutine)(PVOID, ULONG, PVOID);
  2753. +    PVOID InitializationContext;
  2754. +} SYSTEM_ENTROPY_TIMING_INFORMATION, *PSYSTEM_ENTROPY_TIMING_INFORMATION;
  2755. +
  2756.  // private
  2757.  typedef struct _SYSTEM_CONSOLE_INFORMATION
  2758.  {
  2759. @@ -3418,6 +3569,24 @@ typedef struct _SYSTEM_ELAM_CERTIFICATE_INFORMATION
  2760.      HANDLE ElamDriverFile;
  2761.  } SYSTEM_ELAM_CERTIFICATE_INFORMATION, *PSYSTEM_ELAM_CERTIFICATE_INFORMATION;
  2762.  
  2763. +// private
  2764. +typedef struct _OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2
  2765. +{
  2766. +    ULONG Version;
  2767. +    ULONG AbnormalResetOccurred;
  2768. +    ULONG OfflineMemoryDumpCapable;
  2769. +    LARGE_INTEGER ResetDataAddress;
  2770. +    ULONG ResetDataSize;
  2771. +} OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2, *POFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2;
  2772. +
  2773. +// private
  2774. +typedef struct _OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V1
  2775. +{
  2776. +    ULONG Version;
  2777. +    ULONG AbnormalResetOccurred;
  2778. +    ULONG OfflineMemoryDumpCapable;
  2779. +} OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V1, *POFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V1;
  2780. +
  2781.  // private
  2782.  typedef struct _SYSTEM_PROCESSOR_FEATURES_INFORMATION
  2783.  {
  2784. @@ -3425,6 +3594,12 @@ typedef struct _SYSTEM_PROCESSOR_FEATURES_INFORMATION
  2785.      ULONGLONG Reserved[3];
  2786.  } SYSTEM_PROCESSOR_FEATURES_INFORMATION, *PSYSTEM_PROCESSOR_FEATURES_INFORMATION;
  2787.  
  2788. +// EDID v1.4 standard data format
  2789. +typedef struct _SYSTEM_EDID_INFORMATION
  2790. +{
  2791. +    UCHAR Edid[128];
  2792. +} SYSTEM_EDID_INFORMATION, *PSYSTEM_EDID_INFORMATION;
  2793. +
  2794.  // private
  2795.  typedef struct _SYSTEM_MANUFACTURING_INFORMATION
  2796.  {
  2797. @@ -3592,6 +3767,16 @@ typedef struct _SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT
  2798.      GROUP_AFFINITY TargetAffinity;
  2799.  } SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT, *PSYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT;
  2800.  
  2801. +typedef union _SYSTEM_INTERRUPT_STEERING_INFORMATION_OUTPUT
  2802. +{
  2803. +    ULONG AsULONG;
  2804. +    struct
  2805. +    {
  2806. +        ULONG Enabled : 1;
  2807. +        ULONG Reserved : 31;
  2808. +    };
  2809. +} SYSTEM_INTERRUPT_STEERING_INFORMATION_OUTPUT, *PSYSTEM_INTERRUPT_STEERING_INFORMATION_OUTPUT;
  2810. +
  2811.  // private
  2812.  typedef struct _SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION
  2813.  {
  2814. @@ -3839,6 +4024,21 @@ typedef struct _SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION
  2815.      SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION_ENTRY Descriptors[3];
  2816.  } SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION, *PSYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION;
  2817.  
  2818. +// private
  2819. +typedef struct _RTL_FEATURE_USAGE_SUBSCRIPTION_TARGET
  2820. +{
  2821. +    ULONG Data[2];
  2822. +} RTL_FEATURE_USAGE_SUBSCRIPTION_TARGET, *PRTL_FEATURE_USAGE_SUBSCRIPTION_TARGET;
  2823. +
  2824. +// private
  2825. +typedef struct _SYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS
  2826. +{
  2827. +    ULONG FeatureId;
  2828. +    USHORT ReportingKind;
  2829. +    USHORT ReportingOptions;
  2830. +    RTL_FEATURE_USAGE_SUBSCRIPTION_TARGET ReportingTarget;
  2831. +} SYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS, *PSYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS;
  2832. +
  2833.  // private
  2834.  typedef union _SECURE_SPECULATION_CONTROL_INFORMATION
  2835.  {
  2836. diff --git a/phnt/include/ntioapi.h b/phnt/include/ntioapi.h
  2837. index 8136897a..19405395 100644
  2838. --- a/phnt/include/ntioapi.h
  2839. +++ b/phnt/include/ntioapi.h
  2840. @@ -1755,14 +1755,14 @@ typedef enum _IO_SESSION_EVENT
  2841.  
  2842.  typedef enum _IO_SESSION_STATE
  2843.  {
  2844. -    IoSessionStateCreated,
  2845. -    IoSessionStateInitialized,
  2846. -    IoSessionStateConnected,
  2847. -    IoSessionStateDisconnected,
  2848. -    IoSessionStateDisconnectedLoggedOn,
  2849. -    IoSessionStateLoggedOn,
  2850. -    IoSessionStateLoggedOff,
  2851. -    IoSessionStateTerminated,
  2852. +    IoSessionStateCreated = 1,
  2853. +    IoSessionStateInitialized = 2,
  2854. +    IoSessionStateConnected = 3,
  2855. +    IoSessionStateDisconnected = 4,
  2856. +    IoSessionStateDisconnectedLoggedOn = 5,
  2857. +    IoSessionStateLoggedOn = 6,
  2858. +    IoSessionStateLoggedOff = 7,
  2859. +    IoSessionStateTerminated = 8,
  2860.      IoSessionStateMax
  2861.  } IO_SESSION_STATE;
  2862.  
  2863. @@ -1804,23 +1804,24 @@ NtNotifyChangeSession(
  2864.  typedef enum _INTERFACE_TYPE
  2865.  {
  2866.      InterfaceTypeUndefined = -1,
  2867. -    Internal,
  2868. -    Isa,
  2869. -    Eisa,
  2870. -    MicroChannel,
  2871. -    TurboChannel,
  2872. -    PCIBus,
  2873. -    VMEBus,
  2874. -    NuBus,
  2875. -    PCMCIABus,
  2876. -    CBus,
  2877. -    MPIBus,
  2878. -    MPSABus,
  2879. -    ProcessorInternal,
  2880. -    InternalPowerBus,
  2881. -    PNPISABus,
  2882. -    PNPBus,
  2883. -    Vmcs,
  2884. +    Internal = 0,
  2885. +    Isa = 1,
  2886. +    Eisa = 2,
  2887. +    MicroChannel = 3,
  2888. +    TurboChannel = 4,
  2889. +    PCIBus = 5,
  2890. +    VMEBus = 6,
  2891. +    NuBus = 7,
  2892. +    PCMCIABus = 8,
  2893. +    CBus = 9,
  2894. +    MPIBus = 10,
  2895. +    MPSABus = 11,
  2896. +    ProcessorInternal = 12,
  2897. +    InternalPowerBus = 13,
  2898. +    PNPISABus = 14,
  2899. +    PNPBus = 15,
  2900. +    Vmcs = 16,
  2901. +    ACPIBus = 17,
  2902.      MaximumInterfaceType
  2903.  } INTERFACE_TYPE, *PINTERFACE_TYPE;
  2904.  
  2905. @@ -1829,6 +1830,8 @@ typedef enum _DMA_WIDTH
  2906.      Width8Bits,
  2907.      Width16Bits,
  2908.      Width32Bits,
  2909. +    Width64Bits,
  2910. +    WidthNoWrap,
  2911.      MaximumDmaWidth
  2912.  } DMA_WIDTH, *PDMA_WIDTH;
  2913.  
  2914. diff --git a/phnt/include/ntkeapi.h b/phnt/include/ntkeapi.h
  2915. index fefd7696..2d8ebe1c 100644
  2916. --- a/phnt/include/ntkeapi.h
  2917. +++ b/phnt/include/ntkeapi.h
  2918. @@ -46,17 +46,17 @@ typedef enum _KTHREAD_STATE
  2919.  // private
  2920.  typedef enum _KHETERO_CPU_POLICY
  2921.  {
  2922. -    KHeteroCpuPolicyAll,
  2923. -    KHeteroCpuPolicyLarge,
  2924. -    KHeteroCpuPolicyLargeOrIdle,
  2925. -    KHeteroCpuPolicySmall,
  2926. -    KHeteroCpuPolicySmallOrIdle,
  2927. -    KHeteroCpuPolicyDynamic,
  2928. -    KHeteroCpuPolicyStaticMax,
  2929. -    KHeteroCpuPolicyBiasedSmall,
  2930. -    KHeteroCpuPolicyBiasedLarge,
  2931. -    KHeteroCpuPolicyDefault,
  2932. -    KHeteroCpuPolicyMax
  2933. +    KHeteroCpuPolicyAll = 0,
  2934. +    KHeteroCpuPolicyLarge = 1,
  2935. +    KHeteroCpuPolicyLargeOrIdle = 2,
  2936. +    KHeteroCpuPolicySmall = 3,
  2937. +    KHeteroCpuPolicySmallOrIdle = 4,
  2938. +    KHeteroCpuPolicyDynamic = 5,
  2939. +    KHeteroCpuPolicyStaticMax = 5, // valid
  2940. +    KHeteroCpuPolicyBiasedSmall = 6,
  2941. +    KHeteroCpuPolicyBiasedLarge = 7,
  2942. +    KHeteroCpuPolicyDefault = 8,
  2943. +    KHeteroCpuPolicyMax = 9
  2944.  } KHETERO_CPU_POLICY, *PKHETERO_CPU_POLICY;
  2945.  
  2946.  #if (PHNT_MODE != PHNT_MODE_KERNEL)
  2947. diff --git a/phnt/include/ntmisc.h b/phnt/include/ntmisc.h
  2948. index 93c67fbd..ff7721d4 100644
  2949. --- a/phnt/include/ntmisc.h
  2950. +++ b/phnt/include/ntmisc.h
  2951. @@ -44,7 +44,8 @@ typedef enum _VDMSERVICECLASS
  2952.      VdmSetProcessLdtInfo,
  2953.      VdmAdlibEmulation,
  2954.      VdmPMCliControl,
  2955. -    VdmQueryVdmProcess
  2956. +    VdmQueryVdmProcess,
  2957. +    VdmPreInitialize
  2958.  } VDMSERVICECLASS, *PVDMSERVICECLASS;
  2959.  
  2960.  NTSYSCALLAPI
  2961. @@ -77,25 +78,27 @@ typedef enum _TRACE_CONTROL_INFORMATION_CLASS
  2962.      TraceControlIncrementLoggerFile = 6,
  2963.  
  2964.      TraceControlRealtimeConnect = 11,
  2965. +    TraceControlActivityIdCreate = 12,
  2966.      TraceControlWdiDispatchControl = 13,
  2967.      TraceControlRealtimeDisconnectConsumerByHandle = 14,
  2968. -
  2969. +    TraceControlRegisterGuidsCode = 15,
  2970.      TraceControlReceiveNotification = 16,
  2971. -    TraceControlEnableGuid = 17,
  2972. +    TraceControlSendDataBlock = 17, // EnableGuid
  2973.      TraceControlSendReplyDataBlock = 18,
  2974.      TraceControlReceiveReplyDataBlock = 19,
  2975.      TraceControlWdiUpdateSem = 20,
  2976. -    TraceControlGetTraceGuidList = 21,
  2977. +    TraceControlEnumTraceGuidList = 21,
  2978.      TraceControlGetTraceGuidInfo = 22,
  2979.      TraceControlEnumerateTraceGuids = 23,
  2980. -
  2981. +    TraceControlRegisterSecurityProv = 24,
  2982.      TraceControlQueryReferenceTime = 25,
  2983.      TraceControlTrackProviderBinary = 26,
  2984.      TraceControlAddNotificationEvent = 27,
  2985.      TraceControlUpdateDisallowList = 28,
  2986. -
  2987. -    TraceControlUseDescriptorTypeUm = 31,
  2988. -    TraceControlGetTraceGroupList = 32,
  2989. +    TraceControlSetEnableAllKeywordsCode = 29,
  2990. +    TraceControlSetProviderTraitsCode = 30,
  2991. +    TraceControlUseDescriptorTypeCode = 31,
  2992. +    TraceControlEnumTraceGroupList = 32,
  2993.      TraceControlGetTraceGroupInfo = 33,
  2994.      TraceControlTraceSetDisallowList= 34,
  2995.      TraceControlSetCompressionSettings = 35,
  2996. diff --git a/phnt/include/ntpfapi.h b/phnt/include/ntpfapi.h
  2997. index 5cb2154a..ae46b194 100644
  2998. --- a/phnt/include/ntpfapi.h
  2999. +++ b/phnt/include/ntpfapi.h
  3000. @@ -77,8 +77,12 @@ typedef enum _PREFETCHER_INFORMATION_CLASS
  3001.      PrefetcherRetrieveTrace = 1, // q: CHAR[]
  3002.      PrefetcherSystemParameters, // q: PF_SYSTEM_PREFETCH_PARAMETERS
  3003.      PrefetcherBootPhase, // s: PF_BOOT_PHASE_ID
  3004. -    PrefetcherRetrieveBootLoaderTrace, // q: CHAR[]
  3005. -    PrefetcherBootControl // s: PF_BOOT_CONTROL
  3006. +    PrefetcherSpare1, // PrefetcherRetrieveBootLoaderTrace // q: CHAR[]
  3007. +    PrefetcherBootControl, // s: PF_BOOT_CONTROL
  3008. +    PrefetcherScenarioPolicyControl,
  3009. +    PrefetcherSpare2,
  3010. +    PrefetcherAppLaunchScenarioControl,
  3011. +    PrefetcherInformationMax
  3012.  } PREFETCHER_INFORMATION_CLASS;
  3013.  
  3014.  #define PREFETCHER_INFORMATION_VERSION 23 // rev
  3015. @@ -86,11 +90,11 @@ typedef enum _PREFETCHER_INFORMATION_CLASS
  3016.  
  3017.  typedef struct _PREFETCHER_INFORMATION
  3018.  {
  3019. -    ULONG Version;
  3020. -    ULONG Magic;
  3021. -    PREFETCHER_INFORMATION_CLASS PrefetcherInformationClass;
  3022. -    PVOID PrefetcherInformation;
  3023. -    ULONG PrefetcherInformationLength;
  3024. +    _In_ ULONG Version;
  3025. +    _In_ ULONG Magic;
  3026. +    _In_ PREFETCHER_INFORMATION_CLASS PrefetcherInformationClass;
  3027. +    _Inout_ PVOID PrefetcherInformation;
  3028. +    _Inout_ ULONG PrefetcherInformationLength;
  3029.  } PREFETCHER_INFORMATION, *PPREFETCHER_INFORMATION;
  3030.  
  3031.  // Superfetch
  3032. @@ -103,6 +107,7 @@ typedef struct _PF_SYSTEM_SUPERFETCH_PARAMETERS
  3033.      ULONG SavedPageAccessTracesMax;
  3034.      ULONG ScenarioPrefetchTimeoutStandby;
  3035.      ULONG ScenarioPrefetchTimeoutHibernate;
  3036. +    ULONG ScenarioPrefetchTimeoutHiberBoot;
  3037.  } PF_SYSTEM_SUPERFETCH_PARAMETERS, *PPF_SYSTEM_SUPERFETCH_PARAMETERS;
  3038.  
  3039.  #define PF_PFN_PRIO_REQUEST_VERSION 1
  3040. @@ -271,6 +276,14 @@ typedef enum _SUPERFETCH_INFORMATION_CLASS
  3041.      SuperfetchTracingControl,
  3042.      SuperfetchTrimWhileAgingControl,
  3043.      SuperfetchRepurposedByPrefetch, // q: PF_REPURPOSED_BY_PREFETCH_INFO // rev
  3044. +    SuperfetchChannelPowerRequest,
  3045. +    SuperfetchMovePages,
  3046. +    SuperfetchVirtualQuery,
  3047. +    SuperfetchCombineStatsQuery,
  3048. +    SuperfetchSetMinWsAgeRate,
  3049. +    SuperfetchDeprioritizeOldPagesInWs,
  3050. +    SuperfetchFileExtentsQuery,
  3051. +    SuperfetchGpuUtilizationQuery, // PF_GPU_UTILIZATION_INFO
  3052.      SuperfetchInformationMax
  3053.  } SUPERFETCH_INFORMATION_CLASS;
  3054.  
  3055. @@ -281,9 +294,9 @@ typedef struct _SUPERFETCH_INFORMATION
  3056.  {
  3057.      _In_ ULONG Version;
  3058.      _In_ ULONG Magic;
  3059. -    _In_ SUPERFETCH_INFORMATION_CLASS InfoClass;
  3060. -    _Inout_ PVOID Data;
  3061. -    _Inout_ ULONG Length;
  3062. +    _In_ SUPERFETCH_INFORMATION_CLASS SuperfetchInformationClass;
  3063. +    _Inout_ PVOID SuperfetchInformation;
  3064. +    _Inout_ ULONG SuperfetchInformationLength;
  3065.  } SUPERFETCH_INFORMATION, *PSUPERFETCH_INFORMATION;
  3066.  
  3067.  // end_private
  3068. diff --git a/phnt/include/ntpoapi.h b/phnt/include/ntpoapi.h
  3069. index 5d397e64..682094e0 100644
  3070. --- a/phnt/include/ntpoapi.h
  3071. +++ b/phnt/include/ntpoapi.h
  3072. @@ -239,7 +239,7 @@ typedef struct _POWER_STATE_NOTIFY_HANDLER
  3073.  
  3074.  typedef struct _POWER_REQUEST_ACTION
  3075.  {
  3076. -    HANDLE PowerRequest;
  3077. +    HANDLE PowerRequestHandle;
  3078.      POWER_REQUEST_TYPE RequestType;
  3079.      BOOLEAN Enable;
  3080.      HANDLE TargetProcess; // Windows 8+ and only for requests created via PlmPowerRequestCreate
  3081. @@ -247,8 +247,8 @@ typedef struct _POWER_REQUEST_ACTION
  3082.  
  3083.  typedef struct _POWER_REQUEST_LIST
  3084.  {
  3085. -    ULONG_PTR cElements;
  3086. -    ULONG_PTR OffsetsToRequests[ANYSIZE_ARRAY]; // PPOWER_REQUEST
  3087. +    ULONG_PTR Count;
  3088. +    ULONG_PTR PowerRequestOffsets[ANYSIZE_ARRAY]; // PPOWER_REQUEST
  3089.  } POWER_REQUEST_LIST, *PPOWER_REQUEST_LIST;
  3090.  
  3091.  typedef enum _POWER_REQUEST_ORIGIN
  3092. @@ -260,9 +260,9 @@ typedef enum _POWER_REQUEST_ORIGIN
  3093.  
  3094.  typedef struct _POWER_REQUEST_BODY
  3095.  {
  3096. -    ULONG_PTR cbSize;
  3097. -    POWER_REQUEST_ORIGIN Origin;
  3098. -    ULONG_PTR OffsetToRequester; // PWSTR
  3099. +    ULONG_PTR Size;
  3100. +    POWER_REQUEST_ORIGIN CallerType;
  3101. +    ULONG_PTR ProcessImageNameOffset; // PWSTR
  3102.      union
  3103.      {
  3104.          struct
  3105. @@ -270,9 +270,9 @@ typedef struct _POWER_REQUEST_BODY
  3106.              ULONG ProcessId;
  3107.              ULONG ServiceTag;
  3108.          };
  3109. -        ULONG_PTR OffsetToDriverName; // PWSTR
  3110. +        ULONG_PTR DeviceDescriptionOffset; // PWSTR
  3111.      };
  3112. -    ULONG_PTR OffsetToContext; // PCOUNTED_REASON_CONTEXT_RELATIVE
  3113. +    ULONG_PTR ReasonOffset; // PCOUNTED_REASON_CONTEXT_RELATIVE
  3114.  } POWER_REQUEST_BODY, *PPOWER_REQUEST_BODY;
  3115.  
  3116.  // The number of supported request types per version
  3117. @@ -325,12 +325,12 @@ typedef struct _COUNTED_REASON_CONTEXT_RELATIVE
  3118.      {
  3119.          struct
  3120.          {
  3121. -            ULONG_PTR OffsetToResourceFileName;
  3122. +            ULONG_PTR ResourceFileNameOffset;
  3123.              USHORT ResourceReasonId;
  3124.              ULONG StringCount;
  3125. -            ULONG_PTR OffsetToReasonStrings;
  3126. +            ULONG_PTR SubstitutionStringsOffset;
  3127.          };
  3128. -        ULONG_PTR OffsetToSimpleString;
  3129. +        ULONG_PTR SimpleStringOffset;
  3130.      };
  3131.  } COUNTED_REASON_CONTEXT_RELATIVE, *PCOUNTED_REASON_CONTEXT_RELATIVE;
  3132.  #endif
  3133. diff --git a/phnt/include/ntpsapi.h b/phnt/include/ntpsapi.h
  3134. index a5b24a30..f735970d 100644
  3135. --- a/phnt/include/ntpsapi.h
  3136. +++ b/phnt/include/ntpsapi.h
  3137. @@ -1066,16 +1066,16 @@ typedef struct _RTL_UMS_CONTEXT
  3138.      CONTEXT Context;
  3139.      PVOID Teb;
  3140.      PVOID UserContext;
  3141. -    volatile ULONG ScheduledThread;
  3142. -    volatile ULONG Suspended;
  3143. -    volatile ULONG VolatileContext;
  3144. -    volatile ULONG Terminated;
  3145. -    volatile ULONG DebugActive;
  3146. -    volatile ULONG RunningOnSelfThread;
  3147. -    volatile ULONG DenyRunningOnSelfThread;
  3148. +    volatile ULONG ScheduledThread : 1;
  3149. +    volatile ULONG Suspended : 1;
  3150. +    volatile ULONG VolatileContext : 1;
  3151. +    volatile ULONG Terminated : 1;
  3152. +    volatile ULONG DebugActive : 1;
  3153. +    volatile ULONG RunningOnSelfThread : 1;
  3154. +    volatile ULONG DenyRunningOnSelfThread : 1;
  3155.      volatile LONG Flags;
  3156. -    volatile ULONG64 KernelUpdateLock;
  3157. -    volatile ULONG64 PrimaryClientID;
  3158. +    volatile ULONG64 KernelUpdateLock : 2;
  3159. +    volatile ULONG64 PrimaryClientID : 62;
  3160.      volatile ULONG64 ContextLock;
  3161.      struct _RTL_UMS_CONTEXT* PrimaryUmsContext;
  3162.      ULONG SwitchCount;
  3163. diff --git a/phnt/include/ntregapi.h b/phnt/include/ntregapi.h
  3164. index fe98b6d1..9a9c6f6e 100644
  3165. --- a/phnt/include/ntregapi.h
  3166. +++ b/phnt/include/ntregapi.h
  3167. @@ -137,11 +137,11 @@ typedef struct _KEY_TRUST_INFORMATION
  3168.  // private
  3169.  typedef struct _KEY_LAYER_INFORMATION
  3170.  {
  3171. -    ULONG IsTombstone;
  3172. -    ULONG IsSupersedeLocal;
  3173. -    ULONG IsSupersedeTree;
  3174. -    ULONG ClassIsInherited;
  3175. -    ULONG Reserved;
  3176. +    ULONG IsTombstone : 1;
  3177. +    ULONG IsSupersedeLocal : 1;
  3178. +    ULONG IsSupersedeTree : 1;
  3179. +    ULONG ClassIsInherited : 1;
  3180. +    ULONG Reserved : 28;
  3181.  } KEY_LAYER_INFORMATION, *PKEY_LAYER_INFORMATION;
  3182.  
  3183.  typedef enum _KEY_SET_INFORMATION_CLASS
  3184. @@ -247,14 +247,16 @@ typedef struct _KEY_VALUE_LAYER_INFORMATION
  3185.  } KEY_VALUE_LAYER_INFORMATION, *PKEY_VALUE_LAYER_INFORMATION;
  3186.  
  3187.  // rev
  3188. -typedef enum _KEY_LOAD_ENTRY_TYPE {
  3189. +typedef enum _KEY_LOAD_ENTRY_TYPE
  3190. +{
  3191.      KeyLoadTrustClassKey = 1,
  3192.      KeyLoadEvent,
  3193.      KeyLoadToken
  3194.  } KEY_LOAD_ENTRY_TYPE;
  3195.  
  3196.  // rev
  3197. -typedef struct _KEY_LOAD_ENTRY {
  3198. +typedef struct _KEY_LOAD_ENTRY
  3199. +{
  3200.      KEY_LOAD_ENTRY_TYPE EntryType;
  3201.      union
  3202.      {
  3203. diff --git a/phnt/include/ntrtl.h b/phnt/include/ntrtl.h
  3204. index c0f2d78d..786bb8c3 100644
  3205. --- a/phnt/include/ntrtl.h
  3206. +++ b/phnt/include/ntrtl.h
  3207. @@ -8198,25 +8198,75 @@ typedef enum _RTL_BSD_ITEM_TYPE
  3208.  {
  3209.      RtlBsdItemVersionNumber, // q; s: ULONG
  3210.      RtlBsdItemProductType, // q; s: NT_PRODUCT_TYPE (ULONG)
  3211. -    RtlBsdItemAabEnabled, // q: s: BOOLEAN
  3212. -    RtlBsdItemAabTimeout, // q: s: UCHAR
  3213. -    RtlBsdItemBootGood, // q: s: BOOLEAN
  3214. -    RtlBsdItemBootShutdown, // q: s: BOOLEAN
  3215. -    RtlBsdSleepInProgress, // q: s: BOOLEAN
  3216. -    RtlBsdPowerTransition,
  3217. -    RtlBsdItemBootAttemptCount, // q: s: UCHAR
  3218. -    RtlBsdItemBootCheckpoint, // q: s: UCHAR
  3219. +    RtlBsdItemAabEnabled, // q: s: BOOLEAN // AutoAdvancedBoot
  3220. +    RtlBsdItemAabTimeout, // q: s: UCHAR // AdvancedBootMenuTimeout
  3221. +    RtlBsdItemBootGood, // q: s: BOOLEAN // LastBootSucceeded
  3222. +    RtlBsdItemBootShutdown, // q: s: BOOLEAN // LastBootShutdown
  3223. +    RtlBsdSleepInProgress, // q: s: BOOLEAN // SleepInProgress
  3224. +    RtlBsdPowerTransition, // q: s: RTL_BSD_DATA_POWER_TRANSITION
  3225. +    RtlBsdItemBootAttemptCount, // q: s: UCHAR // BootAttemptCount
  3226. +    RtlBsdItemBootCheckpoint, // q: s: UCHAR // LastBootCheckpoint
  3227.      RtlBsdItemBootId, // q; s: ULONG (USER_SHARED_DATA->BootId)
  3228.      RtlBsdItemShutdownBootId, // q; s: ULONG
  3229.      RtlBsdItemReportedAbnormalShutdownBootId, // q; s: ULONG
  3230. -    RtlBsdItemErrorInfo,
  3231. -    RtlBsdItemPowerButtonPressInfo,
  3232. +    RtlBsdItemErrorInfo, // RTL_BSD_DATA_ERROR_INFO
  3233. +    RtlBsdItemPowerButtonPressInfo, // RTL_BSD_POWER_BUTTON_PRESS_INFO
  3234.      RtlBsdItemChecksum, // q: s: UCHAR
  3235.      RtlBsdPowerTransitionExtension,
  3236.      RtlBsdItemFeatureConfigurationState, // q; s: ULONG
  3237.      RtlBsdItemMax
  3238.  } RTL_BSD_ITEM_TYPE;
  3239.  
  3240. +typedef struct _RTL_BSD_DATA_POWER_TRANSITION
  3241. +{
  3242. +    LARGE_INTEGER PowerButtonTimestamp;
  3243. +    struct
  3244. +    {
  3245. +        BOOLEAN SystemRunning : 1;
  3246. +        BOOLEAN ConnectedStandbyInProgress : 1;
  3247. +        BOOLEAN UserShutdownInProgress : 1;
  3248. +        BOOLEAN SystemShutdownInProgress : 1;
  3249. +        BOOLEAN SleepInProgress : 4;
  3250. +    } Flags;
  3251. +    UCHAR ConnectedStandbyScenarioInstanceId;
  3252. +    UCHAR ConnectedStandbyEntryReason;
  3253. +    UCHAR ConnectedStandbyExitReason;
  3254. +    USHORT SystemSleepTransitionCount;
  3255. +    LARGE_INTEGER LastReferenceTime;
  3256. +    ULONG LastReferenceTimeChecksum;
  3257. +    ULONG LastUpdateBootId;
  3258. +} RTL_BSD_DATA_POWER_TRANSITION, *PRTL_BSD_DATA_POWER_TRANSITION;
  3259. +
  3260. +typedef struct _RTL_BSD_DATA_ERROR_INFO
  3261. +{
  3262. +    ULONG BootId;
  3263. +    ULONG RepeatCount;
  3264. +    ULONG OtherErrorCount;
  3265. +    ULONG Code;
  3266. +    ULONG OtherErrorCount2;
  3267. +} RTL_BSD_DATA_ERROR_INFO, *PRTL_BSD_DATA_ERROR_INFO;
  3268. +
  3269. +typedef struct _RTL_BSD_POWER_BUTTON_PRESS_INFO
  3270. +{
  3271. +    LARGE_INTEGER LastPressTime;
  3272. +    ULONG CumulativePressCount;
  3273. +    USHORT LastPressBootId;
  3274. +    UCHAR LastPowerWatchdogStage;
  3275. +    struct
  3276. +    {
  3277. +        UCHAR WatchdogArmed : 1;
  3278. +        UCHAR ShutdownInProgress : 1;
  3279. +    } Flags;
  3280. +    LARGE_INTEGER LastReleaseTime;
  3281. +    ULONG CumulativeReleaseCount;
  3282. +    USHORT LastReleaseBootId;
  3283. +    USHORT ErrorCount;
  3284. +    UCHAR CurrentConnectedStandbyPhase;
  3285. +    ULONG TransitionLatestCheckpointId;
  3286. +    ULONG TransitionLatestCheckpointType;
  3287. +    ULONG TransitionLatestCheckpointSequenceNumber;
  3288. +} RTL_BSD_POWER_BUTTON_PRESS_INFO, *PRTL_BSD_POWER_BUTTON_PRESS_INFO;
  3289. +
  3290.  // private
  3291.  typedef struct _RTL_BSD_ITEM
  3292.  {
  3293.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement