979655a8d060006d094c6155a7592df14edc3e8b
[reactos.git] / reactos / include / ndk / psfuncs.h
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 //
37 NTKERNELAPI
38 PVOID
39 NTAPI
40 PsGetCurrentThreadWin32Thread(
41 VOID
42 );
43
44 NTKERNELAPI
45 PVOID
46 NTAPI
47 PsGetCurrentProcessWin32Process(
48 VOID
49 );
50
51 NTKERNELAPI
52 PVOID
53 NTAPI
54 PsGetProcessWin32Process(
55 _In_ PEPROCESS Process
56 );
57
58 NTKERNELAPI
59 NTSTATUS
60 NTAPI
61 PsSetProcessWin32Process(
62 _Inout_ PEPROCESS Process,
63 _In_opt_ PVOID Win32Process,
64 _In_opt_ PVOID OldWin32Process
65 );
66
67 NTKERNELAPI
68 PVOID
69 NTAPI
70 PsSetThreadWin32Thread(
71 _Inout_ PETHREAD Thread,
72 _In_opt_ PVOID Win32Thread,
73 _In_opt_ PVOID OldWin32Thread
74 );
75
76 NTKERNELAPI
77 PVOID
78 NTAPI
79 PsGetThreadWin32Thread(
80 _In_ PETHREAD Thread
81 );
82
83 NTKERNELAPI
84 PVOID
85 NTAPI
86 PsGetProcessWin32WindowStation(
87 _In_ PEPROCESS Process
88 );
89
90 NTKERNELAPI
91 VOID
92 NTAPI
93 PsSetProcessWindowStation(
94 _Inout_ PEPROCESS Process,
95 _In_opt_ PVOID WindowStation
96 );
97
98 NTKERNELAPI
99 PTEB
100 NTAPI
101 PsGetThreadTeb(
102 _In_ PETHREAD Thread
103 );
104
105 NTKERNELAPI
106 HANDLE
107 NTAPI
108 PsGetThreadId(
109 _In_ PETHREAD Thread
110 );
111
112 NTKERNELAPI
113 PEPROCESS
114 NTAPI
115 PsGetThreadProcess(
116 _In_ PETHREAD Thread
117 );
118
119 NTKERNELAPI
120 BOOLEAN
121 NTAPI
122 PsGetThreadHardErrorsAreDisabled(
123 _In_ PETHREAD Thread
124 );
125
126 NTKERNELAPI
127 VOID
128 NTAPI
129 PsSetThreadHardErrorsAreDisabled(
130 _Inout_ PETHREAD Thread,
131 _In_ BOOLEAN Disabled
132 );
133
134 NTKERNELAPI
135 VOID
136 NTAPI
137 PsEstablishWin32Callouts(
138 _In_ PWIN32_CALLOUTS_FPNS CalloutData
139 );
140
141 NTKERNELAPI
142 VOID
143 NTAPI
144 PsReturnProcessNonPagedPoolQuota(
145 _In_ PEPROCESS Process,
146 _In_ SIZE_T Amount
147 );
148
149 NTKERNELAPI
150 ULONG
151 NTAPI
152 PsGetCurrentProcessSessionId(
153 VOID
154 );
155
156 //
157 // Process Impersonation Functions
158 //
159 NTKERNELAPI
160 BOOLEAN
161 NTAPI
162 PsIsThreadImpersonating(
163 _In_ PETHREAD Thread
164 );
165
166 NTKERNELAPI
167 VOID
168 NTAPI
169 PsRevertThreadToSelf(
170 _Inout_ PETHREAD Thread
171 );
172
173 //
174 // Misc. Functions
175 //
176 NTKERNELAPI
177 NTSTATUS
178 NTAPI
179 PsLookupProcessThreadByCid(
180 _In_ PCLIENT_ID Cid,
181 _Out_opt_ PEPROCESS *Process,
182 _Out_ PETHREAD *Thread
183 );
184
185 BOOLEAN
186 NTAPI
187 PsIsProtectedProcess(
188 _In_ PEPROCESS Process
189 );
190
191 NTKERNELAPI
192 BOOLEAN
193 NTAPI
194 PsIsSystemProcess(
195 _In_ PEPROCESS Process
196 );
197
198 VOID
199 NTAPI
200 PsSetProcessPriorityByClass(
201 _In_ PEPROCESS Process,
202 _In_ PSPROCESSPRIORITYMODE Type
203 );
204
205 HANDLE
206 NTAPI
207 PsGetProcessInheritedFromUniqueProcessId(
208 _In_ PEPROCESS Process
209 );
210
211 NTKERNELAPI
212 NTSTATUS
213 NTAPI
214 PsGetProcessExitStatus(
215 _In_ PEPROCESS Process
216 );
217
218 NTKERNELAPI
219 ULONG
220 NTAPI
221 PsGetProcessSessionId(
222 _In_ PEPROCESS Process
223 );
224
225 NTKERNELAPI
226 BOOLEAN
227 NTAPI
228 PsGetProcessExitProcessCalled(
229 _In_ PEPROCESS Process
230 );
231
232 //
233 // Quota Functions
234 //
235 NTKERNELAPI
236 VOID
237 NTAPI
238 PsChargePoolQuota(
239 _In_ PEPROCESS Process,
240 _In_ POOL_TYPE PoolType,
241 _In_ SIZE_T Amount
242 );
243
244 NTKERNELAPI
245 NTSTATUS
246 NTAPI
247 PsChargeProcessNonPagedPoolQuota(
248 _In_ PEPROCESS Process,
249 _In_ SIZE_T Amount
250 );
251
252 NTKERNELAPI
253 NTSTATUS
254 NTAPI
255 PsChargeProcessPagedPoolQuota(
256 _In_ PEPROCESS Process,
257 _In_ SIZE_T Amount
258 );
259
260 NTKERNELAPI
261 NTSTATUS
262 NTAPI
263 PsChargeProcessPoolQuota(
264 _In_ PEPROCESS Process,
265 _In_ POOL_TYPE PoolType,
266 _In_ SIZE_T Amount
267 );
268
269 NTKERNELAPI
270 VOID
271 NTAPI
272 PsReturnPoolQuota(
273 _In_ PEPROCESS Process,
274 _In_ POOL_TYPE PoolType,
275 _In_ SIZE_T Amount
276 );
277
278 NTKERNELAPI
279 VOID
280 NTAPI
281 PsReturnProcessNonPagedPoolQuota(
282 _In_ PEPROCESS Process,
283 _In_ SIZE_T Amount
284 );
285
286 NTKERNELAPI
287 VOID
288 NTAPI
289 PsReturnProcessPagedPoolQuota(
290 _In_ PEPROCESS Process,
291 _In_ SIZE_T Amount
292 );
293
294 NTKERNELAPI
295 PVOID
296 NTAPI
297 PsGetProcessSecurityPort(
298 _In_ PEPROCESS Process
299 );
300
301 NTKERNELAPI
302 NTSTATUS
303 NTAPI
304 PsSetProcessSecurityPort(
305 _Inout_ PEPROCESS Process,
306 _In_ PVOID SecurityPort
307 );
308
309 NTKERNELAPI
310 HANDLE
311 NTAPI
312 PsGetCurrentThreadProcessId(
313 VOID
314 );
315
316 #endif
317
318 //
319 // Native Calls
320 //
321 NTSYSCALLAPI
322 NTSTATUS
323 NTAPI
324 NtAlertResumeThread(
325 _In_ HANDLE ThreadHandle,
326 _Out_opt_ PULONG SuspendCount
327 );
328
329 typedef ULONG APPHELPCACHESERVICECLASS;
330 NTSYSCALLAPI
331 NTSTATUS
332 NTAPI
333 NtApphelpCacheControl(
334 _In_ APPHELPCACHESERVICECLASS Service,
335 _In_ PVOID ServiceData
336 );
337
338 NTSYSCALLAPI
339 NTSTATUS
340 NTAPI
341 NtAlertThread(
342 _In_ HANDLE ThreadHandle
343 );
344
345 NTSYSCALLAPI
346 NTSTATUS
347 NTAPI
348 NtAssignProcessToJobObject(
349 _In_ HANDLE JobHandle,
350 _In_ HANDLE ProcessHandle
351 );
352
353 NTSYSCALLAPI
354 NTSTATUS
355 NTAPI
356 NtCreateJobObject(
357 _Out_ PHANDLE JobHandle,
358 _In_ ACCESS_MASK DesiredAccess,
359 _In_ POBJECT_ATTRIBUTES ObjectAttributes
360 );
361
362 NTSTATUS
363 NTAPI
364 NtCreateJobSet(
365 _In_ ULONG NumJob,
366 _In_ PJOB_SET_ARRAY UserJobSet,
367 _In_ ULONG Flags
368 );
369
370 NTSYSCALLAPI
371 NTSTATUS
372 NTAPI
373 NtCreateProcess(
374 _Out_ PHANDLE ProcessHandle,
375 _In_ ACCESS_MASK DesiredAccess,
376 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
377 _In_ HANDLE ParentProcess,
378 _In_ BOOLEAN InheritObjectTable,
379 _In_opt_ HANDLE SectionHandle,
380 _In_opt_ HANDLE DebugPort,
381 _In_opt_ HANDLE ExceptionPort
382 );
383
384 NTSYSCALLAPI
385 NTSTATUS
386 NTAPI
387 NtCreateProcessEx(
388 _Out_ PHANDLE ProcessHandle,
389 _In_ ACCESS_MASK DesiredAccess,
390 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
391 _In_ HANDLE ParentProcess,
392 _In_ ULONG Flags,
393 _In_opt_ HANDLE SectionHandle,
394 _In_opt_ HANDLE DebugPort,
395 _In_opt_ HANDLE ExceptionPort,
396 _In_ BOOLEAN InJob
397 );
398
399 NTSYSCALLAPI
400 NTSTATUS
401 NTAPI
402 NtCreateThread(
403 _Out_ PHANDLE ThreadHandle,
404 _In_ ACCESS_MASK DesiredAccess,
405 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
406 _In_ HANDLE ProcessHandle,
407 _Out_ PCLIENT_ID ClientId,
408 _In_ PCONTEXT ThreadContext,
409 _In_ PINITIAL_TEB UserStack,
410 _In_ BOOLEAN CreateSuspended
411 );
412
413 #ifndef NTOS_MODE_USER
414 FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
415 {
416 #if defined(_M_IX86)
417 return (PTEB)__readfsdword(0x18);
418 #elif defined (_M_AMD64)
419 return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
420 #elif defined (_M_ARM)
421 return (struct _TEB *)KeGetPcr()->Used_Self;
422 #endif
423 }
424 #else
425 struct _TEB * NtCurrentTeb(void);
426 #endif
427
428 NTSYSCALLAPI
429 NTSTATUS
430 NTAPI
431 NtImpersonateThread(
432 _In_ HANDLE ThreadHandle,
433 _In_ HANDLE ThreadToImpersonate,
434 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
435 );
436
437 NTSYSCALLAPI
438 NTSTATUS
439 NTAPI
440 NtIsProcessInJob(
441 _In_ HANDLE ProcessHandle,
442 _In_opt_ HANDLE JobHandle
443 );
444
445 __kernel_entry
446 NTSYSCALLAPI
447 NTSTATUS
448 NTAPI
449 NtOpenProcess(
450 _Out_ PHANDLE ProcessHandle,
451 _In_ ACCESS_MASK DesiredAccess,
452 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
453 _In_opt_ PCLIENT_ID ClientId
454 );
455
456 _Must_inspect_result_
457 __kernel_entry
458 NTSYSCALLAPI
459 NTSTATUS
460 NTAPI
461 NtOpenProcessToken(
462 _In_ HANDLE ProcessHandle,
463 _In_ ACCESS_MASK DesiredAccess,
464 _Out_ PHANDLE TokenHandle
465 );
466
467 NTSYSCALLAPI
468 NTSTATUS
469 NTAPI
470 NtOpenThread(
471 _Out_ PHANDLE ThreadHandle,
472 _In_ ACCESS_MASK DesiredAccess,
473 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
474 _In_ PCLIENT_ID ClientId
475 );
476
477 NTSYSCALLAPI
478 NTSTATUS
479 NTAPI
480 NtOpenThreadToken(
481 _In_ HANDLE ThreadHandle,
482 _In_ ACCESS_MASK DesiredAccess,
483 _In_ BOOLEAN OpenAsSelf,
484 _Out_ PHANDLE TokenHandle
485 );
486
487 NTSYSCALLAPI
488 NTSTATUS
489 NTAPI
490 NtOpenThreadTokenEx(
491 _In_ HANDLE ThreadHandle,
492 _In_ ACCESS_MASK DesiredAccess,
493 _In_ BOOLEAN OpenAsSelf,
494 _In_ ULONG HandleAttributes,
495 _Out_ PHANDLE TokenHandle
496 );
497
498 NTSYSCALLAPI
499 NTSTATUS
500 NTAPI
501 NtQueryInformationJobObject(
502 _In_ HANDLE JobHandle,
503 _In_ JOBOBJECTINFOCLASS JobInformationClass,
504 _Out_bytecap_(JobInformationLength) PVOID JobInformation,
505 _In_ ULONG JobInformationLength,
506 _Out_ PULONG ReturnLength
507 );
508
509 #ifndef _NTDDK_
510 __kernel_entry
511 NTSYSCALLAPI
512 NTSTATUS
513 NTAPI
514 NtQueryInformationProcess(
515 _In_ HANDLE ProcessHandle,
516 _In_ PROCESSINFOCLASS ProcessInformationClass,
517 _Out_ PVOID ProcessInformation,
518 _In_ ULONG ProcessInformationLength,
519 _Out_opt_ PULONG ReturnLength
520 );
521 #endif
522
523 NTSYSCALLAPI
524 NTSTATUS
525 NTAPI
526 NtQueryInformationThread(
527 _In_ HANDLE ThreadHandle,
528 _In_ THREADINFOCLASS ThreadInformationClass,
529 _Out_ PVOID ThreadInformation,
530 _In_ ULONG ThreadInformationLength,
531 _Out_opt_ PULONG ReturnLength
532 );
533
534 NTSYSCALLAPI
535 NTSTATUS
536 NTAPI
537 NtRegisterThreadTerminatePort(
538 _In_ HANDLE TerminationPort
539 );
540
541 NTSYSCALLAPI
542 NTSTATUS
543 NTAPI
544 NtResumeThread(
545 _In_ HANDLE ThreadHandle,
546 _Out_opt_ PULONG SuspendCount
547 );
548
549 NTSYSCALLAPI
550 NTSTATUS
551 NTAPI
552 NtResumeProcess(
553 _In_ HANDLE ProcessHandle
554 );
555
556 NTSYSCALLAPI
557 NTSTATUS
558 NTAPI
559 NtSetInformationJobObject(
560 _In_ HANDLE JobHandle,
561 _In_ JOBOBJECTINFOCLASS JobInformationClass,
562 _In_bytecount_(JobInformationLength) PVOID JobInformation,
563 _In_ ULONG JobInformationLength
564 );
565
566 NTSYSCALLAPI
567 NTSTATUS
568 NTAPI
569 NtSetInformationProcess(
570 _In_ HANDLE ProcessHandle,
571 _In_ PROCESSINFOCLASS ProcessInformationClass,
572 _In_ PVOID ProcessInformation,
573 _In_ ULONG ProcessInformationLength
574 );
575
576 __kernel_entry
577 NTSYSCALLAPI
578 NTSTATUS
579 NTAPI
580 NtSetInformationThread(
581 _In_ HANDLE ThreadHandle,
582 _In_ THREADINFOCLASS ThreadInformationClass,
583 _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
584 _In_ ULONG ThreadInformationLength
585 );
586
587 NTSYSCALLAPI
588 NTSTATUS
589 NTAPI
590 NtSuspendProcess(
591 _In_ HANDLE ProcessHandle
592 );
593
594 NTSYSCALLAPI
595 NTSTATUS
596 NTAPI
597 NtSuspendThread(
598 _In_ HANDLE ThreadHandle,
599 _In_ PULONG PreviousSuspendCount
600 );
601
602 NTSYSCALLAPI
603 NTSTATUS
604 NTAPI
605 NtTerminateProcess(
606 _In_ HANDLE ProcessHandle,
607 _In_ NTSTATUS ExitStatus
608 );
609
610 NTSYSCALLAPI
611 NTSTATUS
612 NTAPI
613 NtTerminateThread(
614 _In_ HANDLE ThreadHandle,
615 _In_ NTSTATUS ExitStatus
616 );
617
618 NTSYSCALLAPI
619 NTSTATUS
620 NTAPI
621 NtTerminateJobObject(
622 _In_ HANDLE JobHandle,
623 _In_ NTSTATUS ExitStatus
624 );
625
626 NTSYSAPI
627 NTSTATUS
628 NTAPI
629 ZwAlertResumeThread(
630 _In_ HANDLE ThreadHandle,
631 _Out_opt_ PULONG SuspendCount
632 );
633
634 NTSYSAPI
635 NTSTATUS
636 NTAPI
637 ZwAlertThread(
638 _In_ HANDLE ThreadHandle
639 );
640
641 NTSYSAPI
642 NTSTATUS
643 NTAPI
644 ZwAssignProcessToJobObject(
645 _In_ HANDLE JobHandle,
646 _In_ HANDLE ProcessHandle
647 );
648
649 NTSYSAPI
650 NTSTATUS
651 NTAPI
652 ZwCreateJobObject(
653 _Out_ PHANDLE JobHandle,
654 _In_ ACCESS_MASK DesiredAccess,
655 _In_ POBJECT_ATTRIBUTES ObjectAttributes
656 );
657
658 NTSYSAPI
659 NTSTATUS
660 NTAPI
661 ZwCreateProcess(
662 _Out_ PHANDLE ProcessHandle,
663 _In_ ACCESS_MASK DesiredAccess,
664 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
665 _In_ HANDLE ParentProcess,
666 _In_ BOOLEAN InheritObjectTable,
667 _In_opt_ HANDLE SectionHandle,
668 _In_opt_ HANDLE DebugPort,
669 _In_opt_ HANDLE ExceptionPort
670 );
671
672 NTSYSAPI
673 NTSTATUS
674 NTAPI
675 ZwCreateThread(
676 _Out_ PHANDLE ThreadHandle,
677 _In_ ACCESS_MASK DesiredAccess,
678 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
679 _In_ HANDLE ProcessHandle,
680 _Out_ PCLIENT_ID ClientId,
681 _In_ PCONTEXT ThreadContext,
682 _In_ PINITIAL_TEB UserStack,
683 _In_ BOOLEAN CreateSuspended
684 );
685
686 NTSYSAPI
687 NTSTATUS
688 NTAPI
689 ZwImpersonateThread(
690 _In_ HANDLE ThreadHandle,
691 _In_ HANDLE ThreadToImpersonate,
692 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
693 );
694
695 NTSYSAPI
696 NTSTATUS
697 NTAPI
698 ZwIsProcessInJob(
699 _In_ HANDLE ProcessHandle,
700 _In_opt_ HANDLE JobHandle
701 );
702
703 _IRQL_requires_max_(PASSIVE_LEVEL)
704 NTSYSAPI
705 NTSTATUS
706 NTAPI
707 ZwOpenProcessTokenEx(
708 _In_ HANDLE ProcessHandle,
709 _In_ ACCESS_MASK DesiredAccess,
710 _In_ ULONG HandleAttributes,
711 _Out_ PHANDLE TokenHandle
712 );
713
714 NTSYSAPI
715 NTSTATUS
716 NTAPI
717 ZwOpenThread(
718 _Out_ PHANDLE ThreadHandle,
719 _In_ ACCESS_MASK DesiredAccess,
720 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
721 _In_ PCLIENT_ID ClientId
722 );
723
724 NTSYSAPI
725 NTSTATUS
726 NTAPI
727 ZwOpenThreadToken(
728 _In_ HANDLE ThreadHandle,
729 _In_ ACCESS_MASK DesiredAccess,
730 _In_ BOOLEAN OpenAsSelf,
731 _Out_ PHANDLE TokenHandle
732 );
733
734 NTSYSAPI
735 NTSTATUS
736 NTAPI
737 ZwOpenThreadTokenEx(
738 _In_ HANDLE ThreadHandle,
739 _In_ ACCESS_MASK DesiredAccess,
740 _In_ BOOLEAN OpenAsSelf,
741 _In_ ULONG HandleAttributes,
742 _Out_ PHANDLE TokenHandle
743 );
744
745 NTSYSAPI
746 NTSTATUS
747 NTAPI
748 ZwQueryInformationJobObject(
749 _In_ HANDLE JobHandle,
750 _In_ JOBOBJECTINFOCLASS JobInformationClass,
751 _Out_bytecap_(JobInformationLength) PVOID JobInformation,
752 _In_ ULONG JobInformationLength,
753 _Out_ PULONG ReturnLength
754 );
755
756 #ifndef _NTDDK_
757 NTSYSAPI
758 NTSTATUS
759 NTAPI
760 ZwQueryInformationProcess(
761 _In_ HANDLE ProcessHandle,
762 _In_ PROCESSINFOCLASS ProcessInformationClass,
763 _Out_ PVOID ProcessInformation,
764 _In_ ULONG ProcessInformationLength,
765 _Out_opt_ PULONG ReturnLength
766 );
767 #endif
768
769 NTSYSAPI
770 NTSTATUS
771 NTAPI
772 ZwQueryInformationThread(
773 _In_ HANDLE ThreadHandle,
774 _In_ THREADINFOCLASS ThreadInformationClass,
775 _Out_ PVOID ThreadInformation,
776 _In_ ULONG ThreadInformationLength,
777 _Out_opt_ PULONG ReturnLength
778 );
779
780 NTSYSAPI
781 NTSTATUS
782 NTAPI
783 ZwRegisterThreadTerminatePort(
784 _In_ HANDLE TerminationPort
785 );
786
787 NTSYSAPI
788 NTSTATUS
789 NTAPI
790 ZwResumeThread(
791 _In_ HANDLE ThreadHandle,
792 _Out_opt_ PULONG SuspendCount
793 );
794
795 NTSYSAPI
796 NTSTATUS
797 NTAPI
798 ZwResumeProcess(
799 _In_ HANDLE ProcessHandle
800 );
801
802 NTSYSAPI
803 NTSTATUS
804 NTAPI
805 ZwSetInformationJobObject(
806 _In_ HANDLE JobHandle,
807 _In_ JOBOBJECTINFOCLASS JobInformationClass,
808 _In_ PVOID JobInformation,
809 _In_ ULONG JobInformationLength
810 );
811
812 NTSYSAPI
813 NTSTATUS
814 NTAPI
815 ZwSetInformationProcess(
816 _In_ HANDLE ProcessHandle,
817 _In_ PROCESSINFOCLASS ProcessInformationClass,
818 _In_ PVOID ProcessInformation,
819 _In_ ULONG ProcessInformationLength
820 );
821
822 _IRQL_requires_max_(PASSIVE_LEVEL)
823 NTSYSAPI
824 NTSTATUS
825 NTAPI
826 ZwSetInformationThread(
827 _In_ HANDLE ThreadHandle,
828 _In_ THREADINFOCLASS ThreadInformationClass,
829 _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
830 _In_ ULONG ThreadInformationLength
831 );
832
833 NTSYSAPI
834 NTSTATUS
835 NTAPI
836 ZwSuspendProcess(
837 _In_ HANDLE ProcessHandle
838 );
839
840 NTSYSAPI
841 NTSTATUS
842 NTAPI
843 ZwSuspendThread(
844 _In_ HANDLE ThreadHandle,
845 _In_ PULONG PreviousSuspendCount
846 );
847
848 _IRQL_requires_max_(PASSIVE_LEVEL)
849 NTSYSAPI
850 NTSTATUS
851 NTAPI
852 ZwTerminateProcess (
853 _In_opt_ HANDLE ProcessHandle,
854 _In_ NTSTATUS ExitStatus
855 );
856
857 NTSYSAPI
858 NTSTATUS
859 NTAPI
860 ZwTerminateThread(
861 _In_ HANDLE ThreadHandle,
862 _In_ NTSTATUS ExitStatus
863 );
864
865 NTSYSAPI
866 NTSTATUS
867 NTAPI
868 ZwTerminateJobObject(
869 _In_ HANDLE JobHandle,
870 _In_ NTSTATUS ExitStatus
871 );
872
873 #ifdef __cplusplus
874 }
875 #endif
876
877 #endif