21 _In_ HANDLE ProcessHandle,
22 _Out_ PPROCESS_BASIC_INFORMATION BasicInformation
25 return NtQueryInformationProcess(
27 ProcessBasicInformation,
29 sizeof(PROCESS_BASIC_INFORMATION),
44 _In_ HANDLE ProcessHandle,
45 _Out_ PPROCESS_EXTENDED_BASIC_INFORMATION ExtendedBasicInformation
48 ExtendedBasicInformation->Size =
sizeof(PROCESS_EXTENDED_BASIC_INFORMATION);
50 return NtQueryInformationProcess(
52 ProcessBasicInformation,
53 ExtendedBasicInformation,
54 sizeof(PROCESS_EXTENDED_BASIC_INFORMATION),
69 _In_ HANDLE ProcessHandle,
70 _Out_ PKERNEL_USER_TIMES Times
73 return NtQueryInformationProcess(
77 sizeof(KERNEL_USER_TIMES),
93 _In_ HANDLE ProcessHandle,
94 _Out_ PULONG SessionId
98 PROCESS_SESSION_INFORMATION sessionInfo;
100 status = NtQueryInformationProcess(
102 ProcessSessionInformation,
104 sizeof(PROCESS_SESSION_INFORMATION),
110 *SessionId = sessionInfo.SessionId;
128 _In_ HANDLE ProcessHandle,
129 _Out_ PBOOLEAN IsWow64
135 status = NtQueryInformationProcess(
137 ProcessWow64Information,
163 _In_ HANDLE ProcessHandle,
170 status = NtQueryInformationProcess(
172 ProcessWow64Information,
180 *Peb32 = (PVOID)wow64;
197 _In_ HANDLE ProcessHandle,
198 _Out_ PBOOLEAN IsBeingDebugged
204 status = NtQueryInformationProcess(
214 *IsBeingDebugged = !!debugPort;
235 _In_ HANDLE ProcessHandle,
236 _Out_ PHANDLE DebugObjectHandle
239 return NtQueryInformationProcess(
241 ProcessDebugObjectHandle,
259 _In_ HANDLE ProcessHandle,
260 _Out_ PULONG IoPriority
263 return NtQueryInformationProcess(
283 _In_ HANDLE ProcessHandle,
284 _Out_ PULONG PagePriority
288 PAGE_PRIORITY_INFORMATION pagePriorityInfo;
290 status = NtQueryInformationProcess(
294 sizeof(PAGE_PRIORITY_INFORMATION),
300 *PagePriority = pagePriorityInfo.PagePriority;
317 _In_ HANDLE ProcessHandle,
318 _Out_ PULONG64 CycleTime
324 status = NtQueryInformationProcess(
343 _In_ HANDLE ProcessHandle,
344 _Out_ PHANDLE ConsoleHostProcessId
348 ULONG_PTR consoleHostProcess;
350 status = NtQueryInformationProcess(
352 ProcessConsoleHostProcess,
361 *ConsoleHostProcessId = (HANDLE)consoleHostProcess;
376 _In_ HANDLE ProcessHandle,
377 _In_ ULONG_PTR AffinityMask
380 return NtSetInformationProcess(
398 _In_ HANDLE ThreadHandle,
402 return NtQueryInformationThread(
404 ThreadBasicInformation,
422 _In_ HANDLE ThreadHandle,
423 _Out_ PULONG IoPriority
426 return NtQueryInformationThread(
446 _In_ HANDLE ThreadHandle,
447 _Out_ PULONG PagePriority
451 PAGE_PRIORITY_INFORMATION pagePriorityInfo;
453 status = NtQueryInformationThread(
457 sizeof(PAGE_PRIORITY_INFORMATION),
463 *PagePriority = pagePriorityInfo.PagePriority;
480 _In_ HANDLE ThreadHandle,
481 _Out_ PULONG64 CycleTime
487 status = NtQueryInformationThread(
513 _In_ HANDLE ThreadHandle,
514 _In_ ULONG_PTR AffinityMask
517 return NtSetInformationThread(
528 _In_ HANDLE JobHandle,
529 _Out_ PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION BasicAndIoAccounting
532 return NtQueryInformationJobObject(
534 JobObjectBasicAndIoAccountingInformation,
535 BasicAndIoAccounting,
536 sizeof(JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION),
544 _In_ HANDLE JobHandle,
545 _Out_ PJOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimits
548 return NtQueryInformationJobObject(
550 JobObjectBasicLimitInformation,
552 sizeof(JOBOBJECT_BASIC_LIMIT_INFORMATION),
560 _In_ HANDLE JobHandle,
561 _Out_ PJOBOBJECT_EXTENDED_LIMIT_INFORMATION ExtendedLimits
564 return NtQueryInformationJobObject(
566 JobObjectExtendedLimitInformation,
568 sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION),
576 _In_ HANDLE JobHandle,
577 _Out_ PJOBOBJECT_BASIC_UI_RESTRICTIONS BasicUiRestrictions
580 return NtQueryInformationJobObject(
582 JobObjectBasicUIRestrictions,
584 sizeof(JOBOBJECT_BASIC_UI_RESTRICTIONS),
600 _In_ HANDLE TokenHandle,
601 _Out_ PULONG SessionId
626 _In_ HANDLE TokenHandle,
627 _Out_ PTOKEN_ELEVATION_TYPE ElevationType
636 sizeof(TOKEN_ELEVATION_TYPE),
652 _In_ HANDLE TokenHandle,
653 _Out_ PBOOLEAN Elevated
657 TOKEN_ELEVATION elevation;
664 sizeof(TOKEN_ELEVATION),
670 *Elevated = !!elevation.TokenIsElevated;
687 _In_ HANDLE TokenHandle,
688 _Out_ PTOKEN_STATISTICS Statistics
697 sizeof(TOKEN_STATISTICS),
713 _In_ HANDLE TokenHandle,
714 _Out_ PTOKEN_SOURCE Source
723 sizeof(TOKEN_SOURCE),
740 _In_ HANDLE TokenHandle,
741 _Out_ PHANDLE LinkedTokenHandle
746 TOKEN_LINKED_TOKEN linkedToken;
752 sizeof(TOKEN_LINKED_TOKEN),
759 *LinkedTokenHandle = linkedToken.LinkedToken;
776 _In_ HANDLE TokenHandle,
777 _Out_ PBOOLEAN IsVirtualizationAllowed
782 ULONG virtualizationAllowed;
786 TokenVirtualizationAllowed,
787 &virtualizationAllowed,
795 *IsVirtualizationAllowed = !!virtualizationAllowed;
812 _In_ HANDLE TokenHandle,
813 _Out_ PBOOLEAN IsVirtualizationEnabled
818 ULONG virtualizationEnabled;
822 TokenVirtualizationEnabled,
823 &virtualizationEnabled,
831 *IsVirtualizationEnabled = !!virtualizationEnabled;
839 _In_ HANDLE EventHandle,
840 _Out_ PEVENT_BASIC_INFORMATION BasicInformation
845 EventBasicInformation,
847 sizeof(EVENT_BASIC_INFORMATION),
855 _In_ HANDLE MutantHandle,
856 _Out_ PMUTANT_BASIC_INFORMATION BasicInformation
859 return NtQueryMutant(
861 MutantBasicInformation,
863 sizeof(MUTANT_BASIC_INFORMATION),
871 _In_ HANDLE MutantHandle,
872 _Out_ PMUTANT_OWNER_INFORMATION OwnerInformation
875 return NtQueryMutant(
877 MutantOwnerInformation,
879 sizeof(MUTANT_OWNER_INFORMATION),
887 _In_ HANDLE SectionHandle,
903 _In_ HANDLE SemaphoreHandle,
904 _Out_ PSEMAPHORE_BASIC_INFORMATION BasicInformation
907 return NtQuerySemaphore(
909 SemaphoreBasicInformation,
911 sizeof(SEMAPHORE_BASIC_INFORMATION),
919 _In_ HANDLE TimerHandle,
920 _Out_ PTIMER_BASIC_INFORMATION BasicInformation
925 TimerBasicInformation,
927 sizeof(TIMER_BASIC_INFORMATION),