#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_VISTA) // should be PHNT_WINXP, but is PHNT_VISTA for consistency with RtlExitUserProcess
DECLSPEC_NORETURN
NTSYSAPI
VOID
NTAPI
RtlExitUserThread(
_In_ NTSTATUS ExitStatus
);
View code on GitHub
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_VISTA) // should be PHNT_WINXP, but is PHNT_VISTA for consistency with RtlExitUserProcess
// ...
#else
#define RtlExitUserThread RtlExitUserThread_R
View code on GitHub
Gracefully terminates the current thread.
ExitStatus
- the value to set as the exist status of the thread.The function calls NtQueryInformationThread
with the the THREADINFOCLASS
value of ThreadAmILastThread
(12) and either detaches DLLs and exists the current thread or calls RtlExitUserProcess
.