📄 相关函数zwterminateprocess.txt
字号:
ZwTerminateProcess
ZwTerminateProcess terminates a process and the threads that it contains.
NTSYSAPI
NTSTATUS
NTAPI
ZwTerminateProcess(
IN HANDLE ProcessHandle OPTIONAL,
IN NTSTATUS ExitStatus
);
Parameters
ProcessHandle
A handle to a process object.The handle must grant PROCESS_TERMINATE access. If this
value is zero, the current process is terminated.
ExitStatus
Specifies the exit status for the process and for all threads terminated as a result of this
call.
Return Value
Returns STATUS_SUCCESS or an error status, such as STATUS_ACCESS_DENIED or
STATUS_PROCESS_IS_TERMINATING.
Related Win32 Functions
TerminateProcess, ExitProcess.
Remarks
TerminateProcess exposes the full functionality of ZwTerminateProcess
ZwQueryInformationThread
ZwQueryInformationThread retrieves information about a thread object.
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryInformationThread(
IN HANDLE ThreadHandle,
IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
IN ULONG ThreadInformationLength,
OUT PULONG ReturnLength OPTIONAL
);
Parameters
ThreadHandle
A handle to a thread object.The handle must grant THREAD_QUERY_INFORMATION
access.
ThreadInformationClass
Specifies the type of thread information to be queried.The permitted values are drawn
from the enumeration THREADINFOCLASS, described in the section
“THREADINFOCLASS”.
ThreadInformation
Points to a caller-allocated buffer or variable that receives the requested thread
information.
ThreadInformationLength
Specifies the size in bytes of ThreadInformation, which the caller should set according
to the given ThreadInformationClass.
ReturnLength
Optionally points to a variable, which receives the number of bytes actually returned
to ThreadInformation if the call was successful. If this information is not needed,
ReturnLength may be a null pointer.
Return Value
Returns STATUS_SUCCESS or an error status, such as STATUS_ACCESS_DENIED,
STATUS_INVALID_HANDLE, STATUS_INVALID_INFO_CLASS, or
STATUS_INFO_LENGTH_MISMATCH.
Related Win32 Functions
GetThreadPriority, GetThreadPriorityBoost, GetThreadTimes, GetExitCodeThread,
GetThreadSelectorEntry.
Remarks
None.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -