#ifndef _NTPSAPI_H
// Threads
#if (PHNT_MODE != PHNT_MODE_KERNEL)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetContextThread(
_In_ HANDLE ThreadHandle,
_In_ PCONTEXT ThreadContext
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetContextThread(
_In_ HANDLE ThreadHandle,
_In_ PCONTEXT ThreadContext
);
View code on GitHubChanges the context of the specified thread.
ThreadHandle - a handle to a thread granting THREAD_SET_CONTEXT access.ThreadContext - a pointer to a CONTEXT structure that contains the context to be set in the specified thread. Note: the value of the ContextFlags field specifies which portions of a thread's context to set.