NtSetInformationThread - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTPSAPI_H
//
// Threads
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * Sets information for the specified thread.
 *
 * @param ThreadHandle A handle to the thread.
 * @param ThreadInformationClass The type of thread information to be set.
 * @param ThreadInformation A pointer to a buffer that contains the thread information.
 * @param ThreadInformationLength The size of the buffer pointed to by the ThreadInformation parameter.
 * @return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationThread(
    _In_ HANDLE ThreadHandle,
    _In_ THREADINFOCLASS ThreadInformationClass,
    _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation,
    _In_ ULONG ThreadInformationLength
    );

#endif
#endif

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
    );

#endif

View code on GitHub

Sets various information about the specified thread. This function is partially documented in Windows Driver Kit here and here.

Parameters

Information classes

For the list of supported info classes and required thread access, see THREADINFOCLASS.

Related Win32 API

See also