ReactOS  0.4.13-dev-249-gcba1a2f
psfuncs.h
Go to the documentation of this file.
1 /*++ NDK Version: 0098
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  psfuncs.h
8 
9 Abstract:
10 
11  Function definitions for the Process Manager
12 
13 Author:
14 
15  Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16 
17 --*/
18 
19 #ifndef _PSFUNCS_H
20 #define _PSFUNCS_H
21 
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <pstypes.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #ifndef NTOS_MODE_USER
33 
34 //
35 // Win32K Process/Thread Functions
36 //
38 PVOID
39 NTAPI
41  VOID
42 );
43 
45 PVOID
46 NTAPI
48  VOID
49 );
50 
52 PVOID
53 NTAPI
56 );
57 
60 NTAPI
63  _In_opt_ PVOID Win32Process,
64  _In_opt_ PVOID OldWin32Process
65 );
66 
68 PVOID
69 NTAPI
72  _In_opt_ PVOID Win32Thread,
73  _In_opt_ PVOID OldWin32Thread
74 );
75 
77 PVOID
78 NTAPI
81 );
82 
84 PVOID
85 NTAPI
88 );
89 
91 VOID
92 NTAPI
95  _In_opt_ PVOID WindowStation
96 );
97 
99 PTEB
100 NTAPI
103 );
104 
106 HANDLE
107 NTAPI
110 );
111 
113 PEPROCESS
114 NTAPI
117 );
118 
120 ULONG
121 NTAPI
124 );
125 
127 BOOLEAN
128 NTAPI
131 );
132 
134 VOID
135 NTAPI
139 );
140 
142 VOID
143 NTAPI
145  _In_ PWIN32_CALLOUTS_FPNS CalloutData
146 );
147 
149 VOID
150 NTAPI
154 );
155 
157 ULONG
158 NTAPI
160  VOID
161 );
162 
163 //
164 // Process Impersonation Functions
165 //
167 BOOLEAN
168 NTAPI
171 );
172 
174 VOID
175 NTAPI
178 );
179 
180 //
181 // Misc. Functions
182 //
184 NTSTATUS
185 NTAPI
187  _In_ PCLIENT_ID Cid,
190 );
191 
192 BOOLEAN
193 NTAPI
196 );
197 
199 BOOLEAN
200 NTAPI
203 );
204 
205 VOID
206 NTAPI
210 );
211 
212 HANDLE
213 NTAPI
216 );
217 
219 NTSTATUS
220 NTAPI
223 );
224 
226 ULONG
227 NTAPI
230 );
231 
233 BOOLEAN
234 NTAPI
237 );
238 
239 //
240 // Quota Functions
241 //
243 VOID
244 NTAPI
249 );
250 
252 NTSTATUS
253 NTAPI
257 );
258 
260 NTSTATUS
261 NTAPI
265 );
266 
268 NTSTATUS
269 NTAPI
274 );
275 
277 VOID
278 NTAPI
283 );
284 
286 VOID
287 NTAPI
291 );
292 
294 VOID
295 NTAPI
299 );
300 
302 PVOID
303 NTAPI
306 );
307 
309 NTSTATUS
310 NTAPI
313  _In_ PVOID SecurityPort
314 );
315 
317 HANDLE
318 NTAPI
320  VOID
321 );
322 
323 #endif
324 
325 //
326 // Native Calls
327 //
329 NTSTATUS
330 NTAPI
332  _In_ HANDLE ThreadHandle,
333  _Out_opt_ PULONG SuspendCount
334 );
335 
337 NTSTATUS
338 NTAPI
342 );
343 
345 NTSTATUS
346 NTAPI
348  _In_ HANDLE ThreadHandle
349 );
350 
352 NTSTATUS
353 NTAPI
355  _In_ HANDLE JobHandle,
357 );
358 
360 NTSTATUS
361 NTAPI
363  _Out_ PHANDLE JobHandle,
366 );
367 
368 NTSTATUS
369 NTAPI
371  _In_ ULONG NumJob,
372  _In_ PJOB_SET_ARRAY UserJobSet,
374 );
375 
377 NTSTATUS
378 NTAPI
383  _In_ HANDLE ParentProcess,
384  _In_ BOOLEAN InheritObjectTable,
385  _In_opt_ HANDLE SectionHandle,
386  _In_opt_ HANDLE DebugPort,
387  _In_opt_ HANDLE ExceptionPort
388 );
389 
391 NTSTATUS
392 NTAPI
397  _In_ HANDLE ParentProcess,
398  _In_ ULONG Flags,
399  _In_opt_ HANDLE SectionHandle,
400  _In_opt_ HANDLE DebugPort,
401  _In_opt_ HANDLE ExceptionPort,
402  _In_ BOOLEAN InJob
403 );
404 
406 NTSTATUS
407 NTAPI
409  _Out_ PHANDLE ThreadHandle,
414  _In_ PCONTEXT ThreadContext,
415  _In_ PINITIAL_TEB UserStack,
416  _In_ BOOLEAN CreateSuspended
417 );
418 
419 #ifndef NTOS_MODE_USER
421 {
422 #if defined(_M_IX86)
423  return (PTEB)__readfsdword(0x18);
424 #elif defined (_M_AMD64)
425  return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
426 #elif defined (_M_ARM)
427  return (struct _TEB *)KeGetPcr()->Used_Self;
428 #endif
429 }
430 #else
431 struct _TEB * NtCurrentTeb(void);
432 #endif
433 
435 NTSTATUS
436 NTAPI
438  _In_ HANDLE ThreadHandle,
439  _In_ HANDLE ThreadToImpersonate,
440  _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
441 );
442 
444 NTSTATUS
445 NTAPI
448  _In_opt_ HANDLE JobHandle
449 );
450 
453 NTSTATUS
454 NTAPI
460 );
461 
465 NTSTATUS
466 NTAPI
471 );
472 
474 NTSTATUS
475 NTAPI
477  _Out_ PHANDLE ThreadHandle,
481 );
482 
484 NTSTATUS
485 NTAPI
487  _In_ HANDLE ThreadHandle,
491 );
492 
494 NTSTATUS
495 NTAPI
497  _In_ HANDLE ThreadHandle,
502 );
503 
505 NTSTATUS
506 NTAPI
508  _In_ HANDLE JobHandle,
509  _In_ JOBOBJECTINFOCLASS JobInformationClass,
510  _Out_bytecap_(JobInformationLength) PVOID JobInformation,
511  _In_ ULONG JobInformationLength,
513 );
514 
515 #ifndef _NTDDK_
518 NTSTATUS
519 NTAPI
522  _In_ PROCESSINFOCLASS ProcessInformationClass,
523  _Out_ PVOID ProcessInformation,
524  _In_ ULONG ProcessInformationLength,
526 );
527 #endif
528 
530 NTSTATUS
531 NTAPI
533  _In_ HANDLE ThreadHandle,
535  _Out_ PVOID ThreadInformation,
538 );
539 
541 NTSTATUS
542 NTAPI
544  _In_ HANDLE TerminationPort
545 );
546 
548 NTSTATUS
549 NTAPI
551  _In_ HANDLE ThreadHandle,
552  _Out_opt_ PULONG SuspendCount
553 );
554 
556 NTSTATUS
557 NTAPI
560 );
561 
563 NTSTATUS
564 NTAPI
566  _In_ HANDLE JobHandle,
567  _In_ JOBOBJECTINFOCLASS JobInformationClass,
568  _In_bytecount_(JobInformationLength) PVOID JobInformation,
569  _In_ ULONG JobInformationLength
570 );
571 
573 NTSTATUS
574 NTAPI
577  _In_ PROCESSINFOCLASS ProcessInformationClass,
578  _In_ PVOID ProcessInformation,
579  _In_ ULONG ProcessInformationLength
580 );
581 
584 NTSTATUS
585 NTAPI
587  _In_ HANDLE ThreadHandle,
591 );
592 
594 NTSTATUS
595 NTAPI
598 );
599 
601 NTSTATUS
602 NTAPI
604  _In_ HANDLE ThreadHandle,
605  _In_ PULONG PreviousSuspendCount
606 );
607 
609 NTSTATUS
610 NTAPI
614 );
615 
617 NTSTATUS
618 NTAPI
620  _In_ HANDLE ThreadHandle,
622 );
623 
625 NTSTATUS
626 NTAPI
628  _In_ HANDLE JobHandle,
630 );
631 
632 NTSYSAPI
633 NTSTATUS
634 NTAPI
636  _In_ HANDLE ThreadHandle,
637  _Out_opt_ PULONG SuspendCount
638 );
639 
640 NTSYSAPI
641 NTSTATUS
642 NTAPI
644  _In_ HANDLE ThreadHandle
645 );
646 
647 NTSYSAPI
648 NTSTATUS
649 NTAPI
651  _In_ HANDLE JobHandle,
653 );
654 
655 NTSYSAPI
656 NTSTATUS
657 NTAPI
659  _Out_ PHANDLE JobHandle,
662 );
663 
664 NTSYSAPI
665 NTSTATUS
666 NTAPI
671  _In_ HANDLE ParentProcess,
672  _In_ BOOLEAN InheritObjectTable,
673  _In_opt_ HANDLE SectionHandle,
674  _In_opt_ HANDLE DebugPort,
675  _In_opt_ HANDLE ExceptionPort
676 );
677 
678 NTSYSAPI
679 NTSTATUS
680 NTAPI
682  _Out_ PHANDLE ThreadHandle,
687  _In_ PCONTEXT ThreadContext,
688  _In_ PINITIAL_TEB UserStack,
689  _In_ BOOLEAN CreateSuspended
690 );
691 
692 NTSYSAPI
693 NTSTATUS
694 NTAPI
696  _In_ HANDLE ThreadHandle,
697  _In_ HANDLE ThreadToImpersonate,
698  _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
699 );
700 
701 NTSYSAPI
702 NTSTATUS
703 NTAPI
706  _In_opt_ HANDLE JobHandle
707 );
708 
710 NTSYSAPI
711 NTSTATUS
712 NTAPI
718 );
719 
720 NTSYSAPI
721 NTSTATUS
722 NTAPI
724  _Out_ PHANDLE ThreadHandle,
728 );
729 
730 NTSYSAPI
731 NTSTATUS
732 NTAPI
734  _In_ HANDLE ThreadHandle,
738 );
739 
740 NTSYSAPI
741 NTSTATUS
742 NTAPI
744  _In_ HANDLE ThreadHandle,
749 );
750 
751 NTSYSAPI
752 NTSTATUS
753 NTAPI
755  _In_ HANDLE JobHandle,
756  _In_ JOBOBJECTINFOCLASS JobInformationClass,
757  _Out_bytecap_(JobInformationLength) PVOID JobInformation,
758  _In_ ULONG JobInformationLength,
760 );
761 
762 #ifndef _NTDDK_
763 NTSYSAPI
764 NTSTATUS
765 NTAPI
768  _In_ PROCESSINFOCLASS ProcessInformationClass,
769  _Out_ PVOID ProcessInformation,
770  _In_ ULONG ProcessInformationLength,
772 );
773 #endif
774 
775 NTSYSAPI
776 NTSTATUS
777 NTAPI
779  _In_ HANDLE ThreadHandle,
781  _Out_ PVOID ThreadInformation,
784 );
785 
786 NTSYSAPI
787 NTSTATUS
788 NTAPI
790  _In_ HANDLE TerminationPort
791 );
792 
793 NTSYSAPI
794 NTSTATUS
795 NTAPI
797  _In_ HANDLE ThreadHandle,
798  _Out_opt_ PULONG SuspendCount
799 );
800 
801 NTSYSAPI
802 NTSTATUS
803 NTAPI
806 );
807 
808 NTSYSAPI
809 NTSTATUS
810 NTAPI
812  _In_ HANDLE JobHandle,
813  _In_ JOBOBJECTINFOCLASS JobInformationClass,
814  _In_ PVOID JobInformation,
815  _In_ ULONG JobInformationLength
816 );
817 
818 NTSYSAPI
819 NTSTATUS
820 NTAPI
823  _In_ PROCESSINFOCLASS ProcessInformationClass,
824  _In_ PVOID ProcessInformation,
825  _In_ ULONG ProcessInformationLength
826 );
827 
829 NTSYSAPI
830 NTSTATUS
831 NTAPI
832 ZwSetInformationThread(
833  _In_ HANDLE ThreadHandle,
837 );
838 
839 NTSYSAPI
840 NTSTATUS
841 NTAPI
844 );
845 
846 NTSYSAPI
847 NTSTATUS
848 NTAPI
850  _In_ HANDLE ThreadHandle,
851  _In_ PULONG PreviousSuspendCount
852 );
853 
855 NTSYSAPI
856 NTSTATUS
857 NTAPI
858 ZwTerminateProcess (
861  );
862 
863 NTSYSAPI
864 NTSTATUS
865 NTAPI
867  _In_ HANDLE ThreadHandle,
869 );
870 
871 NTSYSAPI
872 NTSTATUS
873 NTAPI
875  _In_ HANDLE JobHandle,
877 );
878 
879 #ifdef __cplusplus
880 }
881 #endif
882 
883 #endif
NTSYSCALLAPI NTSTATUS NTAPI NtQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_opt_ PULONG ReturnLength)
NTSYSCALLAPI NTSTATUS NTAPI NtResumeProcess(_In_ HANDLE ProcessHandle)
enum _JOBOBJECTINFOCLASS JOBOBJECTINFOCLASS
NTSYSAPI NTSTATUS NTAPI ZwRegisterThreadTerminatePort(_In_ HANDLE TerminationPort)
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:39
#define _Must_inspect_result_
Definition: no_sal2.h:314
NTKERNELAPI NTSTATUS NTAPI PsChargeProcessPoolQuota(_In_ PEPROCESS Process, _In_ POOL_TYPE PoolType, _In_ SIZE_T Amount)
NTKERNELAPI VOID NTAPI PsReturnProcessNonPagedPoolQuota(_In_ PEPROCESS Process, _In_ SIZE_T Amount)
NTKERNELAPI PVOID NTAPI PsGetThreadWin32Thread(_In_ PETHREAD Thread)
NTSYSAPI NTSTATUS NTAPI ZwTerminateThread(_In_ HANDLE ThreadHandle, _In_ NTSTATUS ExitStatus)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateJobObject(_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwAlertResumeThread(_In_ HANDLE ThreadHandle, _Out_opt_ PULONG SuspendCount)
Type
Definition: Type.h:6
NTSYSCALLAPI NTSTATUS NTAPI NtOpenThreadToken(_In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN OpenAsSelf, _Out_ PHANDLE TokenHandle)
_Outptr_ PEPROCESS * Process
Definition: psfuncs.h:64
NTKERNELAPI PTEB NTAPI PsGetThreadTeb(_In_ PETHREAD Thread)
NTSYSCALLAPI NTSTATUS NTAPI NtSuspendThread(_In_ HANDLE ThreadHandle, _In_ PULONG PreviousSuspendCount)
NTSYSCALLAPI NTSTATUS NTAPI NtTerminateProcess(_In_ HANDLE ProcessHandle, _In_ NTSTATUS ExitStatus)
NTSTATUS NTAPI NtCreateJobSet(_In_ ULONG NumJob, _In_ PJOB_SET_ARRAY UserJobSet, _In_ ULONG Flags)
NTSYSAPI NTSTATUS NTAPI ZwCreateJobObject(_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwIsProcessInJob(_In_ HANDLE ProcessHandle, _In_opt_ HANDLE JobHandle)
BOOLEAN NTAPI PsIsProtectedProcess(_In_ PEPROCESS Process)
NTKERNELAPI VOID NTAPI PsReturnProcessPagedPoolQuota(_In_ PEPROCESS Process, _In_ SIZE_T Amount)
NTSYSCALLAPI NTSTATUS NTAPI NtQueryInformationJobObject(_In_ HANDLE JobHandle, _In_ JOBOBJECTINFOCLASS JobInformationClass, _Out_bytecap_(JobInformationLength) PVOID JobInformation, _In_ ULONG JobInformationLength, _Out_ PULONG ReturnLength)
LONG NTSTATUS
Definition: precomp.h:26
NTSYSAPI NTSTATUS NTAPI ZwQueryInformationJobObject(_In_ HANDLE JobHandle, _In_ JOBOBJECTINFOCLASS JobInformationClass, _Out_bytecap_(JobInformationLength) PVOID JobInformation, _In_ ULONG JobInformationLength, _Out_ PULONG ReturnLength)
NTSYSAPI NTSTATUS NTAPI ZwOpenProcessTokenEx(_In_ HANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _Out_ PHANDLE TokenHandle)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES ObjectAttributes
Definition: psfuncs.h:40
NTKERNELAPI VOID NTAPI PsEstablishWin32Callouts(_In_ PWIN32_CALLOUTS_FPNS CalloutData)
NTSYSCALLAPI NTSTATUS NTAPI NtOpenThreadTokenEx(_In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN OpenAsSelf, _In_ ULONG HandleAttributes, _Out_ PHANDLE TokenHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtAssignProcessToJobObject(_In_ HANDLE JobHandle, _In_ HANDLE ProcessHandle)
#define NTSYSCALLAPI
Definition: ntbasedef.h:204
_In_ ACCESS_MASK _In_ ULONG HandleAttributes
Definition: psfuncs.h:715
NTSYSCALLAPI NTSTATUS NTAPI NtApphelpCacheControl(_In_ APPHELPCACHESERVICECLASS Service, _In_opt_ PAPPHELP_CACHE_SERVICE_LOOKUP ServiceData)
Definition: apphelp.c:729
NTKERNELAPI ULONG NTAPI PsGetCurrentProcessSessionId(VOID)
Definition: process.c:1133
_In_ THREADINFOCLASS _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation
NTSYSCALLAPI NTSTATUS NTAPI NtOpenThread(_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PCLIENT_ID ClientId)
NTSYSAPI NTSTATUS NTAPI ZwTerminateJobObject(_In_ HANDLE JobHandle, _In_ NTSTATUS ExitStatus)
NTSYSCALLAPI NTSTATUS NTAPI NtSuspendProcess(_In_ HANDLE ProcessHandle)
NTKERNELAPI ULONG NTAPI PsGetThreadFreezeCount(_In_ PETHREAD Thread)
NTSYSAPI NTSTATUS NTAPI ZwOpenThreadTokenEx(_In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN OpenAsSelf, _In_ ULONG HandleAttributes, _Out_ PHANDLE TokenHandle)
NTKERNELAPI BOOLEAN NTAPI PsIsSystemProcess(_In_ PEPROCESS Process)
NTKERNELAPI ULONG NTAPI PsGetProcessSessionId(_In_ PEPROCESS Process)
NTKERNELAPI PVOID NTAPI PsGetProcessWin32WindowStation(_In_ PEPROCESS Process)
#define NTSYSAPI
Definition: ntoskrnl.h:14
#define KeGetPcr()
Definition: ke.h:25
#define _In_opt_
Definition: no_sal2.h:213
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
NTSYSCALLAPI NTSTATUS NTAPI NtImpersonateThread(_In_ HANDLE ThreadHandle, _In_ HANDLE ThreadToImpersonate, _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService)
_Must_inspect_result_ _Outptr_ PETHREAD * Thread
Definition: psfuncs.h:73
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTKERNELAPI PEPROCESS NTAPI PsGetThreadProcess(_In_ PETHREAD Thread)
_Must_inspect_result_ __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtOpenProcessToken(_In_ HANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE TokenHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateThread(_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ProcessHandle, _Out_ PCLIENT_ID ClientId, _In_ PCONTEXT ThreadContext, _In_ PINITIAL_TEB UserStack, _In_ BOOLEAN CreateSuspended)
NTKERNELAPI VOID NTAPI PsSetThreadHardErrorsAreDisabled(_Inout_ PETHREAD Thread, _In_ BOOLEAN Disabled)
_In_ THREADINFOCLASS ThreadInformationClass
Definition: psfuncs.h:834
NTKERNELAPI PVOID NTAPI PsGetProcessWin32Process(_In_ PEPROCESS Process)
NTSYSCALLAPI NTSTATUS NTAPI NtResumeThread(_In_ HANDLE ThreadHandle, _Out_opt_ PULONG SuspendCount)
NTKERNELAPI VOID NTAPI PsRevertThreadToSelf(_Inout_ PETHREAD Thread)
unsigned char BOOLEAN
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
#define NTKERNELAPI
NTKERNELAPI BOOLEAN NTAPI PsIsThreadImpersonating(_In_ PETHREAD Thread)
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:715
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition: intrin_ppc.h:382
NTKERNELAPI NTSTATUS NTAPI PsLookupProcessThreadByCid(_In_ PCLIENT_ID Cid, _Out_opt_ PEPROCESS *Process, _Out_ PETHREAD *Thread)
NTSYSCALLAPI NTSTATUS NTAPI NtIsProcessInJob(_In_ HANDLE ProcessHandle, _In_opt_ HANDLE JobHandle)
NTSYSAPI NTSTATUS NTAPI ZwSuspendThread(_In_ HANDLE ThreadHandle, _In_ PULONG PreviousSuspendCount)
NTSYSAPI NTSTATUS NTAPI ZwResumeProcess(_In_ HANDLE ProcessHandle)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ POOL_TYPE PoolType
Definition: psfuncs.h:211
NTSYSCALLAPI NTSTATUS NTAPI NtAlertThread(_In_ HANDLE ThreadHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateProcessEx(_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ParentProcess, _In_ ULONG Flags, _In_opt_ HANDLE SectionHandle, _In_opt_ HANDLE DebugPort, _In_opt_ HANDLE ExceptionPort, _In_ BOOLEAN InJob)
NTKERNELAPI PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
Definition: process.c:1183
NTSYSCALLAPI NTSTATUS NTAPI NtTerminateThread(_In_ HANDLE ThreadHandle, _In_ NTSTATUS ExitStatus)
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation, _In_ ULONG ThreadInformationLength)
NTKERNELAPI HANDLE NTAPI PsGetCurrentThreadProcessId(VOID)
Definition: thread.c:755
#define __kernel_entry
Definition: specstrings.h:50
NTSYSAPI NTSTATUS NTAPI ZwQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
NTSYSAPI NTSTATUS NTAPI ZwSetInformationJobObject(_In_ HANDLE JobHandle, _In_ JOBOBJECTINFOCLASS JobInformationClass, _In_ PVOID JobInformation, _In_ ULONG JobInformationLength)
NTKERNELAPI PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
INT POOL_TYPE
Definition: typedefs.h:76
NTKERNELAPI PVOID NTAPI PsSetThreadWin32Thread(_Inout_ PETHREAD Thread, _In_opt_ PVOID Win32Thread, _In_opt_ PVOID OldWin32Thread)
NTSYSAPI NTSTATUS NTAPI ZwAssignProcessToJobObject(_In_ HANDLE JobHandle, _In_ HANDLE ProcessHandle)
NTKERNELAPI NTSTATUS NTAPI PsChargeProcessPagedPoolQuota(_In_ PEPROCESS Process, _In_ SIZE_T Amount)
NTKERNELAPI VOID NTAPI PsSetProcessWindowStation(_Inout_ PEPROCESS Process, _In_opt_ PVOID WindowStation)
#define _Inout_
Definition: no_sal2.h:244
NTSYSAPI NTSTATUS NTAPI ZwResumeThread(_In_ HANDLE ThreadHandle, _Out_opt_ PULONG SuspendCount)
NTKERNELAPI PVOID NTAPI PsGetProcessSecurityPort(_In_ PEPROCESS Process)
VOID NTAPI PsSetProcessPriorityByClass(_In_ PEPROCESS Process, _In_ PSPROCESSPRIORITYMODE Type)
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtOpenProcess(_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_opt_ PCLIENT_ID ClientId)
_In_ POOL_TYPE _In_ ULONG_PTR Amount
Definition: psfuncs.h:211
NTSYSAPI NTSTATUS NTAPI ZwAlertThread(_In_ HANDLE ThreadHandle)
NTSYSAPI NTSTATUS NTAPI ZwSuspendProcess(_In_ HANDLE ProcessHandle)
NTKERNELAPI NTSTATUS NTAPI PsChargeProcessNonPagedPoolQuota(_In_ PEPROCESS Process, _In_ SIZE_T Amount)
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
NTKERNELAPI NTSTATUS NTAPI PsGetProcessExitStatus(_In_ PEPROCESS Process)
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_In_ ULONG _In_opt_ POBJECT_ATTRIBUTES _In_opt_ HANDLE ProcessHandle
Definition: psfuncs.h:87
HANDLE NTAPI PsGetProcessInheritedFromUniqueProcessId(_In_ PEPROCESS Process)
NTKERNELAPI BOOLEAN NTAPI PsGetThreadHardErrorsAreDisabled(_In_ PETHREAD Thread)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateProcess(_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ParentProcess, _In_ BOOLEAN InheritObjectTable, _In_opt_ HANDLE SectionHandle, _In_opt_ HANDLE DebugPort, _In_opt_ HANDLE ExceptionPort)
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:78
NTSYSCALLAPI NTSTATUS NTAPI NtTerminateJobObject(_In_ HANDLE JobHandle, _In_ NTSTATUS ExitStatus)
Definition: compat.h:484
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
enum _THREADINFOCLASS THREADINFOCLASS
Definition: thread.c:106
_In_ THREADINFOCLASS _In_ ULONG ThreadInformationLength
Definition: psfuncs.h:837
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:861
enum _APPHELPCACHESERVICECLASS APPHELPCACHESERVICECLASS
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
unsigned int * PULONG
Definition: retypes.h:1
#define _Out_bytecap_(size)
Definition: no_sal2.h:325
NTKERNELAPI HANDLE NTAPI PsGetThreadId(_In_ PETHREAD Thread)
NTSYSAPI NTSTATUS NTAPI ZwQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_opt_ PULONG ReturnLength)
NTSYSCALLAPI NTSTATUS NTAPI NtRegisterThreadTerminatePort(_In_ HANDLE TerminationPort)
NTSYSAPI NTSTATUS NTAPI ZwOpenThread(_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PCLIENT_ID ClientId)
enum _PROCESSINFOCLASS PROCESSINFOCLASS
Definition: loader.c:63
NTSYSCALLAPI NTSTATUS NTAPI NtAlertResumeThread(_In_ HANDLE ThreadHandle, _Out_opt_ PULONG SuspendCount)
NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationJobObject(_In_ HANDLE JobHandle, _In_ JOBOBJECTINFOCLASS JobInformationClass, _In_bytecount_(JobInformationLength) PVOID JobInformation, _In_ ULONG JobInformationLength)
unsigned int ULONG
Definition: retypes.h:1
_In_ ACCESS_MASK _In_ BOOLEAN OpenAsSelf
Definition: zwfuncs.h:699
_In_ ULONG _In_ ULONG _In_bytecount_(cjIn) PVOID pvIn
Definition: winddi.h:3582
NTSYSAPI NTSTATUS NTAPI ZwImpersonateThread(_In_ HANDLE ThreadHandle, _In_ HANDLE ThreadToImpersonate, _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService)
NTSYSAPI NTSTATUS NTAPI ZwCreateProcess(_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ParentProcess, _In_ BOOLEAN InheritObjectTable, _In_opt_ HANDLE SectionHandle, _In_opt_ HANDLE DebugPort, _In_opt_ HANDLE ExceptionPort)
NTKERNELAPI VOID NTAPI PsReturnPoolQuota(_In_ PEPROCESS Process, _In_ POOL_TYPE PoolType, _In_ SIZE_T Amount)
enum _PSPROCESSPRIORITYMODE PSPROCESSPRIORITYMODE
NTKERNELAPI NTSTATUS NTAPI PsSetProcessWin32Process(_Inout_ PEPROCESS Process, _In_opt_ PVOID Win32Process, _In_opt_ PVOID OldWin32Process)
Definition: process.c:1257
NTKERNELAPI NTSTATUS NTAPI PsSetProcessSecurityPort(_Inout_ PEPROCESS Process, _In_ PVOID SecurityPort)
ULONG ACCESS_MASK
Definition: nt_native.h:40
_IRQL_requires_max_(PASSIVE_LEVEL) NTSYSAPI NTSTATUS NTAPI ZwOpenProcessTokenEx(_In_ HANDLE ProcessHandle
Definition: Messaging.c:64
NTSYSAPI NTSTATUS NTAPI ZwOpenThreadToken(_In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN OpenAsSelf, _Out_ PHANDLE TokenHandle)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _In_opt_ PCLIENT_ID ClientId
Definition: psfuncs.h:40
NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _In_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength)
NTKERNELAPI BOOLEAN NTAPI PsGetProcessExitProcessCalled(_In_ PEPROCESS Process)
_In_ ACCESS_MASK DesiredAccess
Definition: psfuncs.h:715
NTSYSAPI NTSTATUS NTAPI ZwCreateThread(_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ProcessHandle, _Out_ PCLIENT_ID ClientId, _In_ PCONTEXT ThreadContext, _In_ PINITIAL_TEB UserStack, _In_ BOOLEAN CreateSuspended)
NTKERNELAPI VOID NTAPI PsChargePoolQuota(_In_ PEPROCESS Process, _In_ POOL_TYPE PoolType, _In_ SIZE_T Amount)
NTSYSAPI NTSTATUS NTAPI ZwSetInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _In_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength)