#ifndef _NTPSAPI_H
// Threads
#if (PHNT_MODE != PHNT_MODE_KERNEL)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationThread(
_In_ HANDLE ThreadHandle,
_In_ THREADINFOCLASS ThreadInformationClass,
_In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
_In_ ULONG ThreadInformationLength
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetInformationThread(
_In_ HANDLE ThreadHandle,
_In_ THREADINFOCLASS ThreadInformationClass,
_In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
_In_ ULONG ThreadInformationLength
);
View code on GitHubSets various information about the specified thread. This function is partially documented in Windows Driver Kit here and here.
ThreadHandle - a handle to the thread or the NtCurrentThread pseudo-handle. For most information classes, the handle must grant either THREAD_SET_INFORMATION or THREAD_SET_LIMITED_INFORMATION access.ThreadInformationClass - the type of information to set.ThreadInformation - a pointer to the buffer with the data specific to the request.ThreadInformationLength - the size of the provided buffer in bytes.For the list of supported info classes and required thread access, see THREADINFOCLASS.
SetThreadInformationSetThreadIdealProcessorSetThreadIdealProcessorExSetThreadDescriptionSetThreadPriorityBoostSetThreadTokenWow64SetThreadContext