#ifndef _NTPSAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The PROCESS_ACCESS_TOKEN structure is used to manage the security context of a process or thread.
*
* A process's access token can only be changed if the process has no threads or a single thread that has not yet begun execution.
*/
typedef struct _PROCESS_ACCESS_TOKEN
{
//
// Handle to Primary token to assign to the process.
// TOKEN_ASSIGN_PRIMARY access to this token is needed.
//
HANDLE Token;
//
// Handle to the initial thread of the process.
// THREAD_QUERY_INFORMATION access to this thread is needed.
//
// N.B. This field is unused.
//
HANDLE Thread;
} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
View code on GitHub
This structure defines a request to change the primary token of the process.
NtSetInformationProcess
with ProcessAccessToken
(9)A handle to a primary token to use. The handle must grant TOKEN_ASSIGN_PRIMARY
access.
This field is currently unused.