[NDK]
[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 NTSYSCALLAPI
330 NTSTATUS
331 NTAPI
332 NtApphelpCacheControl(
333 _In_ APPHELPCACHESERVICECLASS Service,
334 _In_opt_ PAPPHELP_CACHE_SERVICE_LOOKUP ServiceData
335 );
336
337 NTSYSCALLAPI
338 NTSTATUS
339 NTAPI
340 NtAlertThread(
341 _In_ HANDLE ThreadHandle
342 );
343
344 NTSYSCALLAPI
345 NTSTATUS
346 NTAPI
347 NtAssignProcessToJobObject(
348 _In_ HANDLE JobHandle,
349 _In_ HANDLE ProcessHandle
350 );
351
352 NTSYSCALLAPI
353 NTSTATUS
354 NTAPI
355 NtCreateJobObject(
356 _Out_ PHANDLE JobHandle,
357 _In_ ACCESS_MASK DesiredAccess,
358 _In_ POBJECT_ATTRIBUTES ObjectAttributes
359 );
360
361 NTSTATUS
362 NTAPI
363 NtCreateJobSet(
364 _In_ ULONG NumJob,
365 _In_ PJOB_SET_ARRAY UserJobSet,
366 _In_ ULONG Flags
367 );
368
369 NTSYSCALLAPI
370 NTSTATUS
371 NTAPI
372 NtCreateProcess(
373 _Out_ PHANDLE ProcessHandle,
374 _In_ ACCESS_MASK DesiredAccess,
375 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
376 _In_ HANDLE ParentProcess,
377 _In_ BOOLEAN InheritObjectTable,
378 _In_opt_ HANDLE SectionHandle,
379 _In_opt_ HANDLE DebugPort,
380 _In_opt_ HANDLE ExceptionPort
381 );
382
383 NTSYSCALLAPI
384 NTSTATUS
385 NTAPI
386 NtCreateProcessEx(
387 _Out_ PHANDLE ProcessHandle,
388 _In_ ACCESS_MASK DesiredAccess,
389 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
390 _In_ HANDLE ParentProcess,
391 _In_ ULONG Flags,
392 _In_opt_ HANDLE SectionHandle,
393 _In_opt_ HANDLE DebugPort,
394 _In_opt_ HANDLE ExceptionPort,
395 _In_ BOOLEAN InJob
396 );
397
398 NTSYSCALLAPI
399 NTSTATUS
400 NTAPI
401 NtCreateThread(
402 _Out_ PHANDLE ThreadHandle,
403 _In_ ACCESS_MASK DesiredAccess,
404 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
405 _In_ HANDLE ProcessHandle,
406 _Out_ PCLIENT_ID ClientId,
407 _In_ PCONTEXT ThreadContext,
408 _In_ PINITIAL_TEB UserStack,
409 _In_ BOOLEAN CreateSuspended
410 );
411
412 #ifndef NTOS_MODE_USER
413 FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
414 {
415 #if defined(_M_IX86)
416 return (PTEB)__readfsdword(0x18);
417 #elif defined (_M_AMD64)
418 return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
419 #elif defined (_M_ARM)
420 return (struct _TEB *)KeGetPcr()->Used_Self;
421 #endif
422 }
423 #else
424 struct _TEB * NtCurrentTeb(void);
425 #endif
426
427 NTSYSCALLAPI
428 NTSTATUS
429 NTAPI
430 NtImpersonateThread(
431 _In_ HANDLE ThreadHandle,
432 _In_ HANDLE ThreadToImpersonate,
433 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
434 );
435
436 NTSYSCALLAPI
437 NTSTATUS
438 NTAPI
439 NtIsProcessInJob(
440 _In_ HANDLE ProcessHandle,
441 _In_opt_ HANDLE JobHandle
442 );
443
444 __kernel_entry
445 NTSYSCALLAPI
446 NTSTATUS
447 NTAPI
448 NtOpenProcess(
449 _Out_ PHANDLE ProcessHandle,
450 _In_ ACCESS_MASK DesiredAccess,
451 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
452 _In_opt_ PCLIENT_ID ClientId
453 );
454
455 _Must_inspect_result_
456 __kernel_entry
457 NTSYSCALLAPI
458 NTSTATUS
459 NTAPI
460 NtOpenProcessToken(
461 _In_ HANDLE ProcessHandle,
462 _In_ ACCESS_MASK DesiredAccess,
463 _Out_ PHANDLE TokenHandle
464 );
465
466 NTSYSCALLAPI
467 NTSTATUS
468 NTAPI
469 NtOpenThread(
470 _Out_ PHANDLE ThreadHandle,
471 _In_ ACCESS_MASK DesiredAccess,
472 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
473 _In_ PCLIENT_ID ClientId
474 );
475
476 NTSYSCALLAPI
477 NTSTATUS
478 NTAPI
479 NtOpenThreadToken(
480 _In_ HANDLE ThreadHandle,
481 _In_ ACCESS_MASK DesiredAccess,
482 _In_ BOOLEAN OpenAsSelf,
483 _Out_ PHANDLE TokenHandle
484 );
485
486 NTSYSCALLAPI
487 NTSTATUS
488 NTAPI
489 NtOpenThreadTokenEx(
490 _In_ HANDLE ThreadHandle,
491 _In_ ACCESS_MASK DesiredAccess,
492 _In_ BOOLEAN OpenAsSelf,
493 _In_ ULONG HandleAttributes,
494 _Out_ PHANDLE TokenHandle
495 );
496
497 NTSYSCALLAPI
498 NTSTATUS
499 NTAPI
500 NtQueryInformationJobObject(
501 _In_ HANDLE JobHandle,
502 _In_ JOBOBJECTINFOCLASS JobInformationClass,
503 _Out_bytecap_(JobInformationLength) PVOID JobInformation,
504 _In_ ULONG JobInformationLength,
505 _Out_ PULONG ReturnLength
506 );
507
508 #ifndef _NTDDK_
509 __kernel_entry
510 NTSYSCALLAPI
511 NTSTATUS
512 NTAPI
513 NtQueryInformationProcess(
514 _In_ HANDLE ProcessHandle,
515 _In_ PROCESSINFOCLASS ProcessInformationClass,
516 _Out_ PVOID ProcessInformation,
517 _In_ ULONG ProcessInformationLength,
518 _Out_opt_ PULONG ReturnLength
519 );
520 #endif
521
522 NTSYSCALLAPI
523 NTSTATUS
524 NTAPI
525 NtQueryInformationThread(
526 _In_ HANDLE ThreadHandle,
527 _In_ THREADINFOCLASS ThreadInformationClass,
528 _Out_ PVOID ThreadInformation,
529 _In_ ULONG ThreadInformationLength,
530 _Out_opt_ PULONG ReturnLength
531 );
532
533 NTSYSCALLAPI
534 NTSTATUS
535 NTAPI
536 NtRegisterThreadTerminatePort(
537 _In_ HANDLE TerminationPort
538 );
539
540 NTSYSCALLAPI
541 NTSTATUS
542 NTAPI
543 NtResumeThread(
544 _In_ HANDLE ThreadHandle,
545 _Out_opt_ PULONG SuspendCount
546 );
547
548 NTSYSCALLAPI
549 NTSTATUS
550 NTAPI
551 NtResumeProcess(
552 _In_ HANDLE ProcessHandle
553 );
554
555 NTSYSCALLAPI
556 NTSTATUS
557 NTAPI
558 NtSetInformationJobObject(
559 _In_ HANDLE JobHandle,
560 _In_ JOBOBJECTINFOCLASS JobInformationClass,
561 _In_bytecount_(JobInformationLength) PVOID JobInformation,
562 _In_ ULONG JobInformationLength
563 );
564
565 NTSYSCALLAPI
566 NTSTATUS
567 NTAPI
568 NtSetInformationProcess(
569 _In_ HANDLE ProcessHandle,
570 _In_ PROCESSINFOCLASS ProcessInformationClass,
571 _In_ PVOID ProcessInformation,
572 _In_ ULONG ProcessInformationLength
573 );
574
575 __kernel_entry
576 NTSYSCALLAPI
577 NTSTATUS
578 NTAPI
579 NtSetInformationThread(
580 _In_ HANDLE ThreadHandle,
581 _In_ THREADINFOCLASS ThreadInformationClass,
582 _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
583 _In_ ULONG ThreadInformationLength
584 );
585
586 NTSYSCALLAPI
587 NTSTATUS
588 NTAPI
589 NtSuspendProcess(
590 _In_ HANDLE ProcessHandle
591 );
592
593 NTSYSCALLAPI
594 NTSTATUS
595 NTAPI
596 NtSuspendThread(
597 _In_ HANDLE ThreadHandle,
598 _In_ PULONG PreviousSuspendCount
599 );
600
601 NTSYSCALLAPI
602 NTSTATUS
603 NTAPI
604 NtTerminateProcess(
605 _In_ HANDLE ProcessHandle,
606 _In_ NTSTATUS ExitStatus
607 );
608
609 NTSYSCALLAPI
610 NTSTATUS
611 NTAPI
612 NtTerminateThread(
613 _In_ HANDLE ThreadHandle,
614 _In_ NTSTATUS ExitStatus
615 );
616
617 NTSYSCALLAPI
618 NTSTATUS
619 NTAPI
620 NtTerminateJobObject(
621 _In_ HANDLE JobHandle,
622 _In_ NTSTATUS ExitStatus
623 );
624
625 NTSYSAPI
626 NTSTATUS
627 NTAPI
628 ZwAlertResumeThread(
629 _In_ HANDLE ThreadHandle,
630 _Out_opt_ PULONG SuspendCount
631 );
632
633 NTSYSAPI
634 NTSTATUS
635 NTAPI
636 ZwAlertThread(
637 _In_ HANDLE ThreadHandle
638 );
639
640 NTSYSAPI
641 NTSTATUS
642 NTAPI
643 ZwAssignProcessToJobObject(
644 _In_ HANDLE JobHandle,
645 _In_ HANDLE ProcessHandle
646 );
647
648 NTSYSAPI
649 NTSTATUS
650 NTAPI
651 ZwCreateJobObject(
652 _Out_ PHANDLE JobHandle,
653 _In_ ACCESS_MASK DesiredAccess,
654 _In_ POBJECT_ATTRIBUTES ObjectAttributes
655 );
656
657 NTSYSAPI
658 NTSTATUS
659 NTAPI
660 ZwCreateProcess(
661 _Out_ PHANDLE ProcessHandle,
662 _In_ ACCESS_MASK DesiredAccess,
663 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
664 _In_ HANDLE ParentProcess,
665 _In_ BOOLEAN InheritObjectTable,
666 _In_opt_ HANDLE SectionHandle,
667 _In_opt_ HANDLE DebugPort,
668 _In_opt_ HANDLE ExceptionPort
669 );
670
671 NTSYSAPI
672 NTSTATUS
673 NTAPI
674 ZwCreateThread(
675 _Out_ PHANDLE ThreadHandle,
676 _In_ ACCESS_MASK DesiredAccess,
677 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
678 _In_ HANDLE ProcessHandle,
679 _Out_ PCLIENT_ID ClientId,
680 _In_ PCONTEXT ThreadContext,
681 _In_ PINITIAL_TEB UserStack,
682 _In_ BOOLEAN CreateSuspended
683 );
684
685 NTSYSAPI
686 NTSTATUS
687 NTAPI
688 ZwImpersonateThread(
689 _In_ HANDLE ThreadHandle,
690 _In_ HANDLE ThreadToImpersonate,
691 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
692 );
693
694 NTSYSAPI
695 NTSTATUS
696 NTAPI
697 ZwIsProcessInJob(
698 _In_ HANDLE ProcessHandle,
699 _In_opt_ HANDLE JobHandle
700 );
701
702 _IRQL_requires_max_(PASSIVE_LEVEL)
703 NTSYSAPI
704 NTSTATUS
705 NTAPI
706 ZwOpenProcessTokenEx(
707 _In_ HANDLE ProcessHandle,
708 _In_ ACCESS_MASK DesiredAccess,
709 _In_ ULONG HandleAttributes,
710 _Out_ PHANDLE TokenHandle
711 );
712
713 NTSYSAPI
714 NTSTATUS
715 NTAPI
716 ZwOpenThread(
717 _Out_ PHANDLE ThreadHandle,
718 _In_ ACCESS_MASK DesiredAccess,
719 _In_ POBJECT_ATTRIBUTES ObjectAttributes,
720 _In_ PCLIENT_ID ClientId
721 );
722
723 NTSYSAPI
724 NTSTATUS
725 NTAPI
726 ZwOpenThreadToken(
727 _In_ HANDLE ThreadHandle,
728 _In_ ACCESS_MASK DesiredAccess,
729 _In_ BOOLEAN OpenAsSelf,
730 _Out_ PHANDLE TokenHandle
731 );
732
733 NTSYSAPI
734 NTSTATUS
735 NTAPI
736 ZwOpenThreadTokenEx(
737 _In_ HANDLE ThreadHandle,
738 _In_ ACCESS_MASK DesiredAccess,
739 _In_ BOOLEAN OpenAsSelf,
740 _In_ ULONG HandleAttributes,
741 _Out_ PHANDLE TokenHandle
742 );
743
744 NTSYSAPI
745 NTSTATUS
746 NTAPI
747 ZwQueryInformationJobObject(
748 _In_ HANDLE JobHandle,
749 _In_ JOBOBJECTINFOCLASS JobInformationClass,
750 _Out_bytecap_(JobInformationLength) PVOID JobInformation,
751 _In_ ULONG JobInformationLength,
752 _Out_ PULONG ReturnLength
753 );
754
755 #ifndef _NTDDK_
756 NTSYSAPI
757 NTSTATUS
758 NTAPI
759 ZwQueryInformationProcess(
760 _In_ HANDLE ProcessHandle,
761 _In_ PROCESSINFOCLASS ProcessInformationClass,
762 _Out_ PVOID ProcessInformation,
763 _In_ ULONG ProcessInformationLength,
764 _Out_opt_ PULONG ReturnLength
765 );
766 #endif
767
768 NTSYSAPI
769 NTSTATUS
770 NTAPI
771 ZwQueryInformationThread(
772 _In_ HANDLE ThreadHandle,
773 _In_ THREADINFOCLASS ThreadInformationClass,
774 _Out_ PVOID ThreadInformation,
775 _In_ ULONG ThreadInformationLength,
776 _Out_opt_ PULONG ReturnLength
777 );
778
779 NTSYSAPI
780 NTSTATUS
781 NTAPI
782 ZwRegisterThreadTerminatePort(
783 _In_ HANDLE TerminationPort
784 );
785
786 NTSYSAPI
787 NTSTATUS
788 NTAPI
789 ZwResumeThread(
790 _In_ HANDLE ThreadHandle,
791 _Out_opt_ PULONG SuspendCount
792 );
793
794 NTSYSAPI
795 NTSTATUS
796 NTAPI
797 ZwResumeProcess(
798 _In_ HANDLE ProcessHandle
799 );
800
801 NTSYSAPI
802 NTSTATUS
803 NTAPI
804 ZwSetInformationJobObject(
805 _In_ HANDLE JobHandle,
806 _In_ JOBOBJECTINFOCLASS JobInformationClass,
807 _In_ PVOID JobInformation,
808 _In_ ULONG JobInformationLength
809 );
810
811 NTSYSAPI
812 NTSTATUS
813 NTAPI
814 ZwSetInformationProcess(
815 _In_ HANDLE ProcessHandle,
816 _In_ PROCESSINFOCLASS ProcessInformationClass,
817 _In_ PVOID ProcessInformation,
818 _In_ ULONG ProcessInformationLength
819 );
820
821 _IRQL_requires_max_(PASSIVE_LEVEL)
822 NTSYSAPI
823 NTSTATUS
824 NTAPI
825 ZwSetInformationThread(
826 _In_ HANDLE ThreadHandle,
827 _In_ THREADINFOCLASS ThreadInformationClass,
828 _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
829 _In_ ULONG ThreadInformationLength
830 );
831
832 NTSYSAPI
833 NTSTATUS
834 NTAPI
835 ZwSuspendProcess(
836 _In_ HANDLE ProcessHandle
837 );
838
839 NTSYSAPI
840 NTSTATUS
841 NTAPI
842 ZwSuspendThread(
843 _In_ HANDLE ThreadHandle,
844 _In_ PULONG PreviousSuspendCount
845 );
846
847 _IRQL_requires_max_(PASSIVE_LEVEL)
848 NTSYSAPI
849 NTSTATUS
850 NTAPI
851 ZwTerminateProcess (
852 _In_opt_ HANDLE ProcessHandle,
853 _In_ NTSTATUS ExitStatus
854 );
855
856 NTSYSAPI
857 NTSTATUS
858 NTAPI
859 ZwTerminateThread(
860 _In_ HANDLE ThreadHandle,
861 _In_ NTSTATUS ExitStatus
862 );
863
864 NTSYSAPI
865 NTSTATUS
866 NTAPI
867 ZwTerminateJobObject(
868 _In_ HANDLE JobHandle,
869 _In_ NTSTATUS ExitStatus
870 );
871
872 #ifdef __cplusplus
873 }
874 #endif
875
876 #endif