PS_CPU_QUOTA_QUERY_INFORMATION

The PS_CPU_QUOTA_QUERY_INFORMATION structure is what a successful call to ZwQuerySystemInformation or NtQuerySystemInformation produces in its output buffer when given the information class SystemCpuQuotaInformation (0x71).

Documentation Status

The PS_CPU_QUOTA_QUERY_INFORMATION structure is not documented.

Microsoft’s name for the structure and the offsets, types and names of members are known from private symbol files for various user-mode modules, notably URLMON.DLL from Internet Explorer. Microsoft has published these since Windows 8 in packages of public symbol files. These symbol files also make plain that these user-mode modules know the structure because one source file includes the same NTPSAPI.H that the kernel’s own source code includes.

Layout

The PS_CPU_QUOTA_QUERY_INFORMATION is 0x0C bytes in both 32-bit and 64-bit Windows.

Offset Definition
0x00
ULONG SessionCount;
0x08
PS_CPU_QUOTA_QUERY_ENTRY SessionInformation [ANYSIZE_ARRAY];

While the PS_CPU_QUOTA_QUERY_ENTRY is not known to have any other use, it is as well given here. It is 0x08 bytes in both 32-bit and 64-bit Windows.

Offset Definition
0x00
ULONG SessionId;
0x04
ULONG Weight;

The kernel has a PS_CPU_QUOTA_BLOCK structure for each session. The returned SessionId and Weight that are the structure’s SessionId and CpuShareWeight, respectively.