#ifndef _NTPSAPI_H
// Processes
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* Sets information for the specified process.
*
* @param ProcessHandle A handle to the process.
* @param ProcessInformationClass The type of process information to be set.
* @param ProcessInformation A pointer to a buffer that contains the process information.
* @param ProcessInformationLength The size of the buffer pointed to by the ProcessInformation parameter.
* @return NTSTATUS Successful or errant status.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationProcess(
_In_ HANDLE ProcessHandle,
_In_ PROCESSINFOCLASS ProcessInformationClass,
_In_reads_bytes_(ProcessInformationLength) PVOID ProcessInformation,
_In_ ULONG ProcessInformationLength
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetInformationProcess(
_In_ HANDLE ProcessHandle,
_In_ PROCESSINFOCLASS ProcessInformationClass,
_In_reads_bytes_(ProcessInformationLength) PVOID ProcessInformation,
_In_ ULONG ProcessInformationLength
);
View code on GitHub
Sets various information about the specified process.
ProcessHandle
- a handle to the process or the NtCurrentProcess
pseudo-handle. For most information classes, the handle must grant either PROCESS_SET_INFORMATION
or PROCESS_SET_LIMITED_INFORMATION
access.ProcessInformationClass
- the type of information to set.ProcessInformation
- a pointer to the buffer with the data specific to the request.ProcessInformationLength
- the size of the provided buffer in bytes.For the list of supported info classes and required process access, see PROCESSINFOCLASS
.
SetProcessInformation
SetProcessMitigationPolicy
SetProcessWorkingSetSizeEx
SetErrorMode
SetPriorityClass
SetProcessAffinityMask
SetProcessAffinityUpdateMode
SetProcessPriorityBoost
SetProcessDefaultCpuSetMasks
SetProcessDefaultCpuSets
SetProcessDynamicEHContinuationTargets
SetProcessDynamicEnforcedCetCompatibleRanges
EnableProcessOptionalXStateFeatures