/// The lpValue parameter is a pointer to a DWORD or DWORD64 value that specifies the child process policy. THe policy specifies whether to allow a child
/// process to be created.For information on the possible values for the DWORD or DWORD64 to which lpValue points, see Remarks.
/// This attribute is relevant only to win32 applications that have been converted to UWP packages by using the Desktop Bridge. The lpValue parameter is
/// a pointer to a DWORD value that specifies the desktop app policy. The policy specifies whether descendant processes should continue to run in the
/// desktop environment.For information about the possible values for the DWORD to which lpValue points, see Remarks.
/// The lpValue parameter is a pointer to a GROUP_AFFINITY structure that specifies the processor group affinity for the new thread.Windows Server 2008
/// and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
/// The lpValue parameter is a pointer to a list of handles to be inherited by the child process.These handles must be created as inheritable handles and
/// must not include pseudo handles such as those returned by the GetCurrentProcess or GetCurrentThread function.
/// The lpValue parameter is a pointer to a DWORD or DWORD64 that specifies the exploit mitigation policy for the child process. Starting in Windows 10,
/// version 1703, this parameter can also be a pointer to a two-element DWORD64 array.The specified policy overrides the policies set for the application
/// and the system and cannot be changed after the child process starts running. Windows Server 2008 and Windows Vista: This value is not supported until
/// Windows 7 and Windows Server 2008 R2.The DWORD or DWORD64 pointed to by lpValue can be one or more of the values listed in the remarks.
/// The lpValue parameter is a pointer to a DWORD value of PROTECTION_LEVEL_SAME. This specifies the protection level of the child process to be the same
/// as the protection level of its parent process.
/// The lpValue parameter is a pointer to a SECURITY_CAPABILITIES structure that defines the security capabilities of an app container. If this attribute
/// is set the new process will be created as an AppContainer process.Windows 7, Windows Server 2008 R2, Windows Server 2008 and Windows Vista: This
/// value is not supported until Windows 8 and Windows Server 2012.
/// The lpValue parameter is a pointer to a UMS_CREATE_THREAD_ATTRIBUTES structure that specifies a user-mode scheduling (UMS) thread context and a UMS
/// completion list to associate with the thread. After the UMS thread is created, the system queues it to the specified completion list. The UMS thread
/// runs only when an application's UMS scheduler retrieves the UMS thread from the completion list and selects it to run. For more information,
/// see User-Mode Scheduling.Windows Server 2008 and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
/// An application-defined completion routine. Specify this address when calling the QueueUserAPC function. The PAPCFUNC type defines a pointer to this
/// callback function.
/// </summary>
/// <param name="dwParam">The data passed to the function using the dwData parameter of the QueueUserAPC function.</param>
/// The child processes of a process associated with a job are not associated with the job. If the calling process is not associated with a job, this
/// constant has no effect. If the calling process is associated with a job, the job must set the JOB_OBJECT_LIMIT_BREAKAWAY_OK limit.
/// </summary>
CREATE_BREAKAWAY_FROM_JOB=0x01000000,
/// <summary>
/// The new process does not inherit the error mode of the calling process. Instead, the new process gets the default error mode. This feature is
/// particularly useful for multithreaded shell applications that run with hard errors disabled.The default behavior is for the new process to
/// inherit the error mode of the caller. Setting this flag changes that default behavior.
/// </summary>
CREATE_DEFAULT_ERROR_MODE=0x04000000,
/// <summary>
/// The new process has a new console, instead of inheriting its parent&#39;s console (the default). For more information, see Creation of a
/// Console. This flag cannot be used with DETACHED_PROCESS.
/// </summary>
CREATE_NEW_CONSOLE=0x00000010,
/// <summary>
/// The new process is the root process of a new process group. The process group includes all processes that are descendants of this root process.
/// The process identifier of the new process group is the same as the process identifier, which is returned in the lpProcessInformation parameter.
/// Process groups are used by the GenerateConsoleCtrlEvent function to enable sending a CTRL+BREAK signal to a group of console processes.If this
/// flag is specified, CTRL+C signals will be disabled for all processes within the new process group.This flag is ignored if specified with CREATE_NEW_CONSOLE.
/// </summary>
CREATE_NEW_PROCESS_GROUP=0x00000200,
/// <summary>
/// The process is a console application that is being run without a console window. Therefore, the console handle for the application is not
/// set.This flag is ignored if the application is not a console application, or if it is used with either CREATE_NEW_CONSOLE or DETACHED_PROCESS.
/// </summary>
CREATE_NO_WINDOW=0x08000000,
/// <summary>
/// The process is to be run as a protected process. The system restricts access to protected processes and the threads of protected processes. For
/// more information on how processes can interact with protected processes, see Process Security and Access Rights.To activate a protected process,
/// the binary must have a special signature. This signature is provided by Microsoft but not currently available for non-Microsoft binaries. There
/// are currently four protected processes: media foundation, audio engine, Windows error reporting, and system. Components that load into these
/// binaries must also be signed. Multimedia companies can leverage the first two protected processes. For more information, see Overview of the
/// Protected Media Path.Windows Server 2003 and Windows XP: This value is not supported.
/// </summary>
CREATE_PROTECTED_PROCESS=0x00040000,
/// <summary>
/// Allows the caller to execute a child process that bypasses the process restrictions that would normally be applied automatically to the process.
/// </summary>
CREATE_PRESERVE_CODE_AUTHZ_LEVEL=0x02000000,
/// <summary>This flag allows secure processes, that run in the Virtualization-Based Security environment, to launch.</summary>
CREATE_SECURE_PROCESS=0x00400000,
/// <summary>
/// This flag is valid only when starting a 16-bit Windows-based application. If set, the new process runs in a private Virtual DOS Machine (VDM). By
/// default, all 16-bit Windows-based applications run as threads in a single, shared VDM. The advantage of running separately is that a crash only
/// terminates the single VDM; any other programs running in distinct VDMs continue to function normally. Also, 16-bit Windows-based applications
/// that are run in separate VDMs have separate input queues. That means that if one application stops responding momentarily, applications in
/// separate VDMs continue to receive input. The disadvantage of running separately is that it takes significantly more memory to do so. You should
/// use this flag only if the user requests that 16-bit applications should run in their own VDM.
/// </summary>
CREATE_SEPARATE_WOW_VDM=0x00000800,
/// <summary>
/// The flag is valid only when starting a 16-bit Windows-based application. If the DefaultSeparateVDM switch in the Windows section of WIN.INI is
/// TRUE, this flag overrides the switch. The new process is run in the shared Virtual DOS Machine.
/// </summary>
CREATE_SHARED_WOW_VDM=0x00001000,
/// <summary>The primary thread of the new process is created in a suspended state, and does not run until the ResumeThread function is called.</summary>
CREATE_SUSPENDED=0x00000004,
/// <summary>
/// If this flag is set, the environment block pointed to by lpEnvironment uses Unicode characters. Otherwise, the environment block uses ANSI characters.
/// </summary>
CREATE_UNICODE_ENVIRONMENT=0x00000400,
/// <summary>The calling thread starts and debugs the new process. It can receive all related debug events using the WaitForDebugEvent function.</summary>
DEBUG_ONLY_THIS_PROCESS=0x00000002,
/// <summary>
/// The calling thread starts and debugs the new process and all child processes created by the new process. It can receive all related debug events
/// using the WaitForDebugEvent function. A process that uses DEBUG_PROCESS becomes the root of a debugging chain. This continues until another
/// process in the chain is created with DEBUG_PROCESS.If this flag is combined with DEBUG_ONLY_THIS_PROCESS, the caller debugs only the new process,
/// not any child processes.
/// </summary>
DEBUG_PROCESS=0x00000001,
/// <summary>
/// For console processes, the new process does not inherit its parent&#39;s console (the default). The new process can call the AllocConsole
/// function at a later time to create a console. For more information, see Creation of a Console. This value cannot be used with CREATE_NEW_CONSOLE.
/// </summary>
DETACHED_PROCESS=0x00000008,
/// <summary>
/// The process is created with extended startup information; the lpStartupInfo parameter specifies a STARTUPINFOEX structure.Windows Server 2003 and
/// Windows XP: This value is not supported.
/// </summary>
EXTENDED_STARTUPINFO_PRESENT=0x00080000,
/// <summary>
/// The process inherits its parent&#39;s affinity. If the parent process has threads in more than one processor group, the new process inherits
/// the group-relative affinity of an arbitrary group in use by the parent.Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:
/// This value is not supported.
/// </summary>
INHERIT_PARENT_AFFINITY=0x00010000,
/// <summary>Process with no special scheduling needs.</summary>
NORMAL_PRIORITY_CLASS=0x00000020,
/// <summary>
/// Process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An
/// example is a screen saver. The idle priority class is inherited by child processes.
/// </summary>
IDLE_PRIORITY_CLASS=0x00000040,
/// <summary>
/// Process that performs time-critical tasks that must be executed immediately for it to run correctly. The threads of a high-priority class process
/// preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user,
/// regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class CPU-bound
/// application can use nearly all available cycles.
/// </summary>
HIGH_PRIORITY_CLASS=0x00000080,
/// <summary>
/// Process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes,
/// including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief
/// interval can cause disk caches not to flush or cause the mouse to be unresponsive.
/// </summary>
REALTIME_PRIORITY_CLASS=0x00000100,
/// <summary>Process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS.</summary>
BELOW_NORMAL_PRIORITY_CLASS=0x00004000,
/// <summary>Process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS.</summary>
ABOVE_NORMAL_PRIORITY_CLASS=0x00008000,
/// <summary>Undocumented.</summary>
CREATE_FORCEDOS=0x00002000,
/// <summary>Creates profiles for the user mode modeuls of the process.</summary>
PROFILE_USER=0x10000000,
/// <summary>Undocumented.</summary>
PROFILE_KERNEL=0x20000000,
/// <summary>Undocumented.</summary>
PROFILE_SERVER=0x40000000,
/// <summary>Undocumented.</summary>
CREATE_IGNORE_SYSTEM_DEFAULT=0x80000000,
/// <summary>Undocumented.</summary>
INHERIT_CALLER_PRIORITY=0x00020000,
/// <summary>
/// Begin background processing mode. The system lowers the resource scheduling priorities of the process (and its threads) so that it can perform
/// background work without significantly affecting activity in the foreground.
/// <para>
/// This value can be specified only if hProcess is a handle to the current process. The function fails if the process is already in background
/// processing mode.
/// </para>
/// <para>Windows Server 2003 and Windows XP: This value is not supported.</para>
/// </summary>
PROCESS_MODE_BACKGROUND_BEGIN=0x00100000,
/// <summary>
/// End background processing mode. The system restores the resource scheduling priorities of the process (and its threads) as they were before the
/// process entered background processing mode.
/// <para>
/// This value can be specified only if hProcess is a handle to the current process. The function fails if the process is not in background
/// processing mode.
/// </para>
/// <para>Windows Server 2003 and Windows XP: This value is not supported.</para>
/// </summary>
PROCESS_MODE_BACKGROUND_END=0x00200000,
}
/// <summary>Flags used by <see cref="CreateRemoteThread"/>.</summary>
[Flags]
publicenumCREATE_THREAD_FLAGS
{
/// <term>The thread runs immediately after creation.</term>
RUN_IMMEDIATELY=0,
/// <term>The thread is created in a suspended state, and does not run until the ResumeThread function is called.</term>
CREATE_SUSPENDED=4,
/// The dwStackSize parameter specifies the initial reserve size of the stack. If this flag is not specified, dwStackSize specifies the commit size.
STACK_SIZE_PARAM_IS_A_RESERVATION=0x00010000,
}
/// <summary>The memory priority for the thread or process.</summary>
publicenumMEMORY_PRIORITY
{
/// <summary>Lowest memory priority.</summary>
MEMORY_PRIORITY_LOWEST=0,
/// <summary>Very low memory priority.</summary>
MEMORY_PRIORITY_VERY_LOW=1,
/// <summary>Low memory priority.</summary>
MEMORY_PRIORITY_LOW=2,
/// <summary>Medium memory priority.</summary>
MEMORY_PRIORITY_MEDIUM=3,
/// <summary>Below normal memory priority.</summary>
MEMORY_PRIORITY_BELOW_NORMAL=4,
/// <summary>Normal memory priority. This is the default priority for all threads and processes on the system.</summary>
MEMORY_PRIORITY_NORMAL=5,
}
/// <summary>The affinity update mode.</summary>
publicenumPROCESS_AFFINITY_MODE
{
/// <summary>Dynamic update of the process affinity by the system is disabled.</summary>
PROCESS_AFFINITY_DISABLE_AUTO_UPDATE,
/// <summary>Dynamic update of the process affinity by the system is enabled.</summary>
PROCESS_AFFINITY_ENABLE_AUTO_UPDATE
}
/// <summary>Indicates type of structure used in <c>GetProcessInformation</c> and <c>SetProcessInformation</c> calls.</summary>
publicenumPROCESS_INFORMATION_CLASS
{
/// <summary>Indicates that a MEMORY_PRIORITY_INFORMATION structure is specified for the operation.</summary>
/// <summary>If set, the process cannot create child processes.</summary>
NoChildProcessCreation=1<<0,
/// <summary>
/// If set, causes audit events to be generated when child processes are created by the process. If both NoChildProcessCreation and
/// AuditNoChildProcessCreation are set, NoChildProcessCreation takes precedence over audit setting.
/// </summary>
AuditNoChildProcessCreation=1<<1,
/// <summary>
/// Denies creation of child processes unless the child process is a secure process and if creation was previously blocked. It allows a process to
/// spawn a child process on behalf of another process that cannot itself create child processes. See PROCESS_CREATION_CHILD_PROCESS_OVERRIDE in UpdateProcThreadAttribute.
/// </summary>
AllowSecureProcessCreation=1<<2,
}
/// <summary>Flags used by PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY</summary>
/// <summary>Set (0x1) to prevent the process from generating dynamic code or modifying existing executable code; otherwise leave unset (0x0).</summary>
ProhibitDynamicCode=1<<0,
/// <summary>
/// Set (0x1) to allow threads to opt out of the restrictions on dynamic code generation by calling the <c>SetThreadInformation</c> function with the
/// ThreadInformation parameter set to <c>ThreadDynamicCodePolicy</c>; otherwise leave unset (0x0). You should not use the <c>AllowThreadOptOut</c>
/// and <c>ThreadDynamicCodePolicy</c> settings together to provide strong security. These settings are only intended to enable applications to adapt
/// their code more easily for full dynamic code restrictions.
/// </summary>
AllowThreadOptOut=1<<1,
/// <summary>
/// Set (0x1) to allow non-AppContainer processes to modify all of the dynamic code settings for the calling process, including relaxing dynamic code
/// restrictions after they have been set.
/// </summary>
AllowRemoteDowngrade=1<<2,
/// <summary>Undocumented</summary>
AuditProhibitDynamicCode=1<<3,
}
/// <summary>Flags used by PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY</summary>
/// <summary>If set this enables the Export Address Filter mitigation in enforcement mode for the process.</summary>
EnableExportAddressFilter=1<<0,
/// <summary>If set this enables the Export Address Filter mitigation in audit mode for the process.</summary>
AuditExportAddressFilter=1<<1,
/// <summary>If set this enables the Export Address Filter Plus mitigation in enforcement mode for the process.</summary>
EnableExportAddressFilterPlus=1<<2,
/// <summary>If set this enables the Export Address Filter mitigation in audit mode for the process.</summary>
AuditExportAddressFilterPlus=1<<3,
/// <summary>If set this enables the Import Address Filter mitigation in enforcement mode for the process.</summary>
EnableImportAddressFilter=1<<4,
/// <summary>If set this enables the Import Address Filter mitigation in enforcement mode for the process.</summary>
AuditImportAddressFilter=1<<5,
/// <summary>If set this enables the stack pivot anti-ROP (Return-oriented-programming) mitigation in enforcement mode for the process.</summary>
EnableRopStackPivot=1<<6,
/// <summary>If set this enables the stack pivot anti-ROP (Return-oriented-programming) mitigation in audit mode for the process.</summary>
AuditRopStackPivot=1<<7,
/// <summary>
/// If set this enables the caller check anti-ROP (Return-oriented-programming) mitigation in enforcement mode for the process. Applies to 32-bit
/// processes only.
/// </summary>
EnableRopCallerCheck=1<<8,
/// <summary>
/// If set this enables the caller check anti-ROP (Return-oriented-programming) mitigation in audit mode for the process. Applies to 32-bit processes only.
/// </summary>
AuditRopCallerCheck=1<<9,
/// <summary>
/// If set this enables the simulated execution anti-ROP (Return-oriented-programming) mitigation in enforcement mode for the process. Applies to
/// 32-bit processes only.
/// </summary>
EnableRopSimExec=1<<10,
/// <summary>
/// If set this enables the simulated execution anti-ROP (Return-oriented-programming) mitigation in audit mode for the process. Applies to 32-bit
/// processes only.
/// </summary>
AuditRopSimExec=1<<11,
}
/// <summary>Represents the different process mitigation policies.</summary>
[PInvokeData("winnt.h")]
publicenumPROCESS_MITIGATION_POLICY
{
/// <summary>The data execution prevention (DEP) policy of the process.</summary>
/// The process will receive a fatal error if it manipulates an invalid handle. Useful for preventing downstream problems in a process due to handle misuse.
/// <para>Windows Server 2003 and Windows XP/2000: This feature is not supported.</para>
/// </summary>
PF_SSE3_INSTRUCTIONS_AVAILABLE=13,
/// <summary>Virtualization is enabled in the firmware.</summary>
PF_VIRT_FIRMWARE_ENABLED=21,
/// <summary>The SSE instruction set is available.</summary>
PF_XMMI_INSTRUCTIONS_AVAILABLE=6,
/// <summary>
/// The SSE2 instruction set is available.
/// <para>Windows 2000: This feature is not supported.</para>
/// </summary>
PF_XMMI64_INSTRUCTIONS_AVAILABLE=10,
/// <summary>
/// The processor implements the XSAVE and XRSTOR instructions.
/// <para>
/// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This feature is not supported until Windows 7 and Windows Server
/// 2008 R2.
/// </para>
/// </summary>
PF_XSAVE_ENABLED=17,
}
/// <summary>Process protection level.</summary>
publicenumPROTECTION_LEVEL:uint
{
/// <summary>For internal use only.</summary>
PROTECTION_LEVEL_WINTCB_LIGHT=0x00000000,
/// <summary>For internal use only.</summary>
PROTECTION_LEVEL_WINDOWS=0x00000001,
/// <summary>For internal use only.</summary>
PROTECTION_LEVEL_WINDOWS_LIGHT=0x00000002,
/// <summary>For internal use only.</summary>
PROTECTION_LEVEL_ANTIMALWARE_LIGHT=0x00000003,
/// <summary>For internal use only.</summary>
PROTECTION_LEVEL_LSA_LIGHT=0x00000004,
/// <summary>Not implemented.</summary>
PROTECTION_LEVEL_WINTCB=0x00000005,
/// <summary>Not implemented.</summary>
PROTECTION_LEVEL_CODEGEN_LIGHT=0x00000006,
/// <summary>Not implemented.</summary>
PROTECTION_LEVEL_AUTHENTICODE=0x00000007,
/// <summary>The process is a third party app that is using process protection.</summary>
PROTECTION_LEVEL_PPL_APP=0x00000008,
/// <summary>The protection level same</summary>
PROTECTION_LEVEL_SAME=0xFFFFFFFF,
/// <summary>The process is not protected.</summary>
PROTECTION_LEVEL_NONE=0xFFFFFFFE,
}
/// <summary>Value retrieved by the <see cref="GetProcessShutdownParameters"/> function.</summary>
publicenumSHUTDOWN
{
/// <summary>
/// If this process takes longer than the specified timeout to shut down, do not display a retry dialog box for the user. Instead, just cause the
/// process to directly exit.
/// </summary>
SHUTDOWN_NORETRY=1
}
/// <summary>Flags used in the <see cref="STARTUPINFO.dwFlags"/> field.</summary>
[PInvokeData("WinBase.h")]
[Flags]
publicenumSTARTF
{
/// <summary>
/// Indicates that the cursor is in feedback mode for two seconds after CreateProcess is called. The Working in Background cursor is displayed (see
/// the Pointers tab in the Mouse control panel utility). If during those two seconds the process makes the first GUI call, the system gives five
/// more seconds to the process. If during those five seconds the process shows a window, the system gives five more seconds to the process to finish
/// drawing the window.The system turns the feedback cursor off after the first call to GetMessage, regardless of whether the process is drawing.
/// </summary>
STARTF_FORCEONFEEDBACK=0x00000040,
/// <summary>Indicates that the feedback cursor is forced off while the process is starting. The Normal Select cursor is displayed.</summary>
STARTF_FORCEOFFFEEDBACK=0x00000080,
/// <summary>Indicates that any windows created by the process cannot be pinned on the taskbar.This flag must be combined with STARTF_TITLEISAPPID.</summary>
STARTF_PREVENTPINNING=0x00002000,
/// <summary>
/// Indicates that the process should be run in full-screen mode, rather than in windowed mode. This flag is only valid for console applications
/// running on an x86 computer.
/// </summary>
STARTF_RUNFULLSCREEN=0x00000020,
/// <summary>
/// The lpTitle member contains an AppUserModelID. This identifier controls how the taskbar and Start menu present the application, and enables it to
/// be associated with the correct shortcuts and Jump Lists. Generally, applications will use the SetCurrentProcessExplicitAppUserModelID and
/// GetCurrentProcessExplicitAppUserModelID functions instead of setting this flag. For more information, see Application User Model IDs.If
/// STARTF_PREVENTPINNING is used, application windows cannot be pinned on the taskbar. The use of any AppUserModelID-related window properties by
/// the application overrides this setting for that window only.This flag cannot be used with STARTF_TITLEISLINKNAME.
/// </summary>
STARTF_TITLEISAPPID=0x00001000,
/// <summary>
/// The lpTitle member contains the path of the shortcut file (.lnk) that the user invoked to start this process. This is typically set by the shell
/// when a .lnk file pointing to the launched application is invoked. Most applications will not need to set this value.This flag cannot be used with STARTF_TITLEISAPPID.
/// </summary>
STARTF_TITLEISLINKNAME=0x00000800,
/// <summary>The command line came from an untrusted source. For more information, see Remarks.</summary>
STARTF_UNTRUSTEDSOURCE=0x00008000,
/// <summary>The dwXCountChars and dwYCountChars members contain additional information.</summary>
STARTF_USECOUNTCHARS=0x00000008,
/// <summary>The dwFillAttribute member contains additional information.</summary>
STARTF_USEFILLATTRIBUTE=0x00000010,
/// <summary>The hStdInput member contains additional information. This flag cannot be used with STARTF_USESTDHANDLES.</summary>
STARTF_USEHOTKEY=0x00000200,
/// <summary>The dwX and dwY members contain additional information.</summary>
STARTF_USEPOSITION=0x00000004,
/// <summary>The wShowWindow member contains additional information.</summary>
/// <summary>The dwXSize and dwYSize members contain additional information.</summary>
STARTF_USESIZE=0x00000002,
/// <summary>
/// The hStdInput, hStdOutput, and hStdError members contain additional information. If this flag is specified when calling one of the process
/// creation functions, the handles must be inheritable and the function&#39;s bInheritHandles parameter must be set to TRUE. For more
/// information, see Handle Inheritance.If this flag is specified when calling the GetStartupInfo function, these members are either the handle value
/// specified during process creation or INVALID_HANDLE_VALUE.Handles must be closed with CloseHandle when they are no longer needed.This flag cannot
/// be used with STARTF_USEHOTKEY.
/// </summary>
STARTF_USESTDHANDLES=0x00000100,
}
/// <summary>Used by the <see cref="SYSTEM_CPU_SET_INFORMATION"/> structure.</summary>
[Flags]
publicenumSYSTEM_CPU_SET_FLAGS:byte
{
/// <summary>
/// If set, the home processor of this CPU Set is parked. If the CPU Set is on a parked processor, threads assigned to that set may be reassigned to
/// other processors that are selected by the Process Default sets or the Thread Selected sets. If all such processors are parked, the threads are
/// reassigned to other available processors on the system.
/// </summary>
SYSTEM_CPU_SET_INFORMATION_PARKED=0x1,
/// <summary>
/// If set, the specified CPU Set is not available for general system use, but instead is allocated for exclusive use of some processes. If a
/// non-NULL Process argument is specified in a call to GetSystemCpuSetInformation, it is possible to determine if the processor is allocated for use
/// with that process.
/// </summary>
SYSTEM_CPU_SET_INFORMATION_ALLOCATED=0x2,
/// <summary>
/// This is set if the CPU Set is allocated for the exclusive use of some subset of the system processes and if it is allocated for the use of the
/// process passed into GetSystemCpuSetInformation.
/// This is set of the CPU Set is on a processor that is suitable for low-latency realtime processing. The system takes steps to ensure that RealTime
/// CPU Sets are unlikely to be running non-preemptible code, by moving other work like Interrupts and other application threads off of those processors.
/// </summary>
SYSTEM_CPU_SET_INFORMATION_REALTIME=0x8,
}
/// <summary></summary>
publicenumTHREAD_INFORMATION_CLASS
{
/// <summary>The thread memory priority</summary>
ThreadMemoryPriority,
/// <summary>The thread absolute cpu priority</summary>
/// <para>Creates a new process and its primary thread. The new process runs in the security context of the calling process.</para>
/// <para>
/// If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token. To run the
/// new process in the security context of the user represented by the impersonation token, use the <c>CreateProcessAsUser</c> or
/// <c>CreateProcessWithLogonW</c> function.
/// </para>
/// </summary>
/// <param name="lpApplicationName">
/// <para>
/// The name of the module to be executed. This module can be a Windows-based application. It can be some other type of module (for example, MS-DOS or
/// OS/2) if the appropriate subsystem is available on the local computer.
/// </para>
/// <para>
/// The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the
/// function uses the current drive and current directory to complete the specification. The function will not use the search path. This parameter must
/// include the file name extension; no default extension is assumed.
/// </para>
/// <para>
/// The lpApplicationName parameter can be <c>NULL</c>. In that case, the module name must be the first white space–delimited token in the lpCommandLine
/// string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin;
/// otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a
/// number of ways. The system tries to interpret the possibilities in the following order:
/// </para>
/// <para>
/// If the executable module is a 16-bit application, lpApplicationName should be <c>NULL</c>, and the string pointed to by lpCommandLine should specify
/// the executable module as well as its arguments.
/// </para>
/// <para>
/// To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c
/// plus the name of the batch file.
/// </para>
/// </param>
/// <param name="lpCommandLine">
/// <para>
/// The command line to be executed. The maximum length of this string is 32,768 characters, including the Unicode terminating null character. If
/// lpApplicationName is <c>NULL</c>, the module name portion of lpCommandLine is limited to <c>MAX_PATH</c> characters.
/// </para>
/// <para>
/// The Unicode version of this function, <c>CreateProcessW</c>, can modify the contents of this string. Therefore, this parameter cannot be a pointer to
/// read-only memory (such as a <c>const</c> variable or a literal string). If this parameter is a constant string, the function may cause an access violation.
/// </para>
/// <para>The lpCommandLine parameter can be NULL. In that case, the function uses the string pointed to by lpApplicationName as the command line.</para>
/// <para>
/// If both lpApplicationName and lpCommandLine are non- <c>NULL</c>, the null-terminated string pointed to by lpApplicationName specifies the module to
/// execute, and the null-terminated string pointed to by lpCommandLine specifies the command line. The new process can use <c>GetCommandLine</c> to
/// retrieve the entire command line. Console processes written in C can use the argc and argv arguments to parse the command line. Because argv[0] is
/// the module name, C programmers generally repeat the module name as the first token in the command line.
/// </para>
/// <para>
/// If lpApplicationName is NULL, the first white space–delimited token of the command line specifies the module name. If you are using a long file name
/// that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the lpApplicationName
/// parameter). If the file name does not contain an extension, .exe is appended. Therefore, if the file name extension is .com, this parameter must
/// include the .com extension. If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended. If
/// the file name does not contain a directory path, the system searches for the executable file in the following sequence:
/// </para>
/// <para>
/// The system adds a terminating null character to the command-line string to separate the file name from the arguments. This divides the original
/// string into two strings for internal processing.
/// </para>
/// </param>
/// <param name="lpProcessAttributes">
/// <para>
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that determines whether the returned handle to the new process object can be inherited by child
/// processes. If lpProcessAttributes is <c>NULL</c>, the handle cannot be inherited.
/// </para>
/// <para>
/// The <c>lpSecurityDescriptor</c> member of the structure specifies a security descriptor for the new process. If lpProcessAttributes is NULL or
/// <c>lpSecurityDescriptor</c> is <c>NULL</c>, the process gets a default security descriptor. The ACLs in the default security descriptor for a process
/// come from the primary token of the creator.
/// </para>
/// <para>
/// <c>Windows XP:</c> The ACLs in the default security descriptor for a process come from the primary or impersonation token of the creator. This
/// behavior changed with Windows XP with SP2 and Windows Server 2003.
/// </para>
/// </param>
/// <param name="lpThreadAttributes">
/// <para>
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that determines whether the returned handle to the new thread object can be inherited by child
/// processes. If lpThreadAttributes is NULL, the handle cannot be inherited.
/// </para>
/// <para>
/// The <c>lpSecurityDescriptor</c> member of the structure specifies a security descriptor for the main thread. If lpThreadAttributes is NULL or
/// <c>lpSecurityDescriptor</c> is NULL, the thread gets a default security descriptor. The ACLs in the default security descriptor for a thread come
/// from the process token.
/// </para>
/// <para>
/// <c>Windows XP:</c> The ACLs in the default security descriptor for a thread come from the primary or impersonation token of the creator. This
/// behavior changed with Windows XP with SP2 and Windows Server 2003.
/// </para>
/// </param>
/// <param name="bInheritHandles">
/// <para>
/// If this parameter is TRUE, each inheritable handle in the calling process is inherited by the new process. If the parameter is FALSE, the handles are
/// not inherited. Note that inherited handles have the same value and access rights as the original handles.
/// </para>
/// <para>
/// <c>Terminal Services:</c> You cannot inherit handles across sessions. Additionally, if this parameter is TRUE, you must create the process in the
/// same session as the caller.
/// </para>
/// <para>
/// <c>Protected Process Light (PPL) processes:</c> The generic handle inheritance is blocked when a PPL process creates a non-PPL process since
/// PROCESS_DUP_HANDLE is not allowed from a non-PPL process to a PPL process. See Process Security and Access Rights
/// </para>
/// </param>
/// <param name="dwCreationFlags">
/// <para>The flags that control the priority class and the creation of the process. For a list of values, see Process Creation Flags.</para>
/// <para>
/// This parameter also controls the new process's priority class, which is used to determine the scheduling priorities of the process's threads. For a
/// list of values, see <c>GetPriorityClass</c>. If none of the priority class flags is specified, the priority class defaults to
/// <c>NORMAL_PRIORITY_CLASS</c> unless the priority class of the creating process is <c>IDLE_PRIORITY_CLASS</c> or <c>BELOW_NORMAL_PRIORITY_CLASS</c>.
/// In this case, the child process receives the default priority class of the calling process.
/// </para>
/// </param>
/// <param name="lpEnvironment">
/// <para>
/// A pointer to the environment block for the new process. If this parameter is <c>NULL</c>, the new process uses the environment of the calling process.
/// </para>
/// <para>An environment block consists of a null-terminated block of null-terminated strings. Each string is in the following form:</para>
/// <para>name=value\0</para>
/// <para>Because the equal sign is used as a separator, it must not be used in the name of an environment variable.</para>
/// <para>
/// An environment block can contain either Unicode or ANSI characters. If the environment block pointed to by lpEnvironment contains Unicode characters,
/// be sure that dwCreationFlags includes <c>CREATE_UNICODE_ENVIRONMENT</c>. If this parameter is <c>NULL</c> and the environment block of the parent
/// process contains Unicode characters, you must also ensure that dwCreationFlags includes <c>CREATE_UNICODE_ENVIRONMENT</c>.
/// </para>
/// <para>The ANSI version of this function, <c>CreateProcessA</c> fails if the total size of the environment block for the process exceeds 32,767 characters.</para>
/// <para>
/// Note that an ANSI environment block is terminated by two zero bytes: one for the last string, one more to terminate the block. A Unicode environment
/// block is terminated by four zero bytes: two for the last string, two more to terminate the block.
/// </para>
/// </param>
/// <param name="lpCurrentDirectory">
/// <para>The full path to the current directory for the process. The string can also specify a UNC path.</para>
/// <para>
/// If this parameter is <c>NULL</c>, the new process will have the same current drive and directory as the calling process. (This feature is provided
/// primarily for shells that need to start an application and specify its initial drive and working directory.)
/// </para>
/// </param>
/// <param name="lpStartupInfo">
/// <para>A pointer to a <c>STARTUPINFO</c> or <c>STARTUPINFOEX</c> structure.</para>
/// <para>To set extended attributes, use a <c>STARTUPINFOEX</c> structure and specify EXTENDED_STARTUPINFO_PRESENT in the dwCreationFlags parameter.</para>
/// <para>Handles in <c>STARTUPINFO</c> or <c>STARTUPINFOEX</c> must be closed with <c>CloseHandle</c> when they are no longer needed.</para>
/// </param>
/// <param name="lpProcessInformation">
/// <para>A pointer to a <c>PROCESS_INFORMATION</c> structure that receives identification information about the new process.</para>
/// <para>Handles in <c>PROCESS_INFORMATION</c> must be closed with <c>CloseHandle</c> when they are no longer needed.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// Note that the function returns before the process has finished initialization. If a required DLL cannot be located or fails to initialize, the
/// process is terminated. To get the termination status of a process, call <c>GetExitCodeProcess</c>.
/// <para>Creates a new process and its primary thread. The new process runs in the security context of the user represented by the specified token.</para>
/// <para>
/// Typically, the process that calls the <c>CreateProcessAsUser</c> function must have the <c>SE_INCREASE_QUOTA_NAME</c> privilege and may require the
/// <c>SE_ASSIGNPRIMARYTOKEN_NAME</c> privilege if the token is not assignable. If this function fails with <c>ERROR_PRIVILEGE_NOT_HELD</c> (1314), use
/// the <c>CreateProcessWithLogonW</c> function instead. <c>CreateProcessWithLogonW</c> requires no special privileges, but the specified user account
/// must be allowed to log on interactively. Generally, it is best to use <c>CreateProcessWithLogonW</c> to create a process with alternate credentials.
/// </para>
/// </summary>
/// <param name="hToken">
/// <para>
/// A handle to the primary token that represents a user. The handle must have the <c>TOKEN_QUERY</c>, <c>TOKEN_DUPLICATE</c>, and
/// <c>TOKEN_ASSIGN_PRIMARY</c> access rights. For more information, see <c>Access Rights for Access-Token Objects</c>. The user represented by the token
/// must have read and execute access to the application specified by the lpApplicationName or the lpCommandLine parameter.
/// </para>
/// <para>
/// To get a primary token that represents the specified user, call the <c>LogonUser</c> function. Alternatively, you can call the
/// <c>DuplicateTokenEx</c> function to convert an impersonation token into a primary token. This allows a server application that is impersonating a
/// client to create a process that has the security context of the client.
/// </para>
/// <para>
/// If hToken is a restricted version of the caller's primary token, the <c>SE_ASSIGNPRIMARYTOKEN_NAME</c> privilege is not required. If the necessary
/// privileges are not already enabled, <c>CreateProcessAsUser</c> enables them for the duration of the call. For more information, see Running with
/// Special Privileges.
/// </para>
/// <para>
/// <c>Terminal Services:</c> The process is run in the session specified in the token. By default, this is the same session that called
/// <c>LogonUser</c>. To change the session, use the <c>SetTokenInformation</c> function.
/// </para>
/// </param>
/// <param name="lpApplicationName">
/// <para>
/// The name of the module to be executed. This module can be a Windows-based application. It can be some other type of module (for example, MS-DOS or
/// OS/2) if the appropriate subsystem is available on the local computer.
/// </para>
/// <para>
/// The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the
/// function uses the current drive and current directory to complete the specification. The function will not use the search path. This parameter must
/// include the file name extension; no default extension is assumed.
/// </para>
/// <para>
/// The lpApplicationName parameter can be <c>NULL</c>. In that case, the module name must be the first white space–delimited token in the lpCommandLine
/// string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin;
/// otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a
/// number of ways. The system tries to interpret the possibilities in the following order:
/// </para>
/// <para>
/// If the executable module is a 16-bit application, lpApplicationName should be <c>NULL</c>, and the string pointed to by lpCommandLine should specify
/// the executable module as well as its arguments. By default, all 16-bit Windows-based applications created by <c>CreateProcessAsUser</c> are run in a
/// separate VDM (equivalent to <c>CREATE_SEPARATE_WOW_VDM</c> in <c>CreateProcess</c>).
/// </para>
/// </param>
/// <param name="lpCommandLine">
/// <para>
/// The command line to be executed. The maximum length of this string is 32K characters. If lpApplicationName is <c>NULL</c>, the module name portion of
/// lpCommandLine is limited to <c>MAX_PATH</c> characters.
/// </para>
/// <para>
/// The Unicode version of this function, <c>CreateProcessAsUserW</c>, can modify the contents of this string. Therefore, this parameter cannot be a
/// pointer to read-only memory (such as a <c>const</c> variable or a literal string). If this parameter is a constant string, the function may cause an
/// access violation.
/// </para>
/// <para>
/// The lpCommandLine parameter can be <c>NULL</c>. In that case, the function uses the string pointed to by lpApplicationName as the command line.
/// </para>
/// <para>
/// If both lpApplicationName and lpCommandLine are non- <c>NULL</c>, *lpApplicationName specifies the module to execute, and *lpCommandLine specifies
/// the command line. The new process can use <c>GetCommandLine</c> to retrieve the entire command line. Console processes written in C can use the argc
/// and argv arguments to parse the command line. Because argv[0] is the module name, C programmers generally repeat the module name as the first token
/// in the command line.
/// </para>
/// <para>
/// If lpApplicationName is <c>NULL</c>, the first white space–delimited token of the command line specifies the module name. If you are using a long
/// file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the
/// lpApplicationName parameter). If the file name does not contain an extension, .exe is appended. Therefore, if the file name extension is .com, this
/// parameter must include the .com extension. If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not
/// appended. If the file name does not contain a directory path, the system searches for the executable file in the following sequence:
/// </para>
/// <para>
/// The system adds a null character to the command line string to separate the file name from the arguments. This divides the original string into two
/// strings for internal processing.
/// </para>
/// </param>
/// <param name="lpProcessAttributes">
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that specifies a security descriptor for the new process object and determines whether child
/// processes can inherit the returned handle to the process. If lpProcessAttributes is <c>NULL</c> or <c>lpSecurityDescriptor</c> is <c>NULL</c>, the
/// process gets a default security descriptor and the handle cannot be inherited. The default security descriptor is that of the user referenced in the
/// hToken parameter. This security descriptor may not allow access for the caller, in which case the process may not be opened again after it is run.
/// The process handle is valid and will continue to have full access rights.
/// </param>
/// <param name="lpThreadAttributes">
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that specifies a security descriptor for the new thread object and determines whether child
/// processes can inherit the returned handle to the thread. If lpThreadAttributes is <c>NULL</c> or <c>lpSecurityDescriptor</c> is <c>NULL</c>, the
/// thread gets a default security descriptor and the handle cannot be inherited. The default security descriptor is that of the user referenced in the
/// hToken parameter. This security descriptor may not allow access for the caller.
/// </param>
/// <param name="bInheritHandles">
/// <para>
/// If this parameter is <c>TRUE</c>, each inheritable handle in the calling process is inherited by the new process. If the parameter is <c>FALSE</c>,
/// the handles are not inherited. Note that inherited handles have the same value and access rights as the original handles.
/// </para>
/// <para>
/// <c>Terminal Services:</c> You cannot inherit handles across sessions. Additionally, if this parameter is <c>TRUE</c>, you must create the process in
/// the same session as the caller.
/// </para>
/// <para>
/// <c>Protected Process Light (PPL) processes:</c> The generic handle inheritance is blocked when a PPL process creates a non-PPL process since
/// PROCESS_DUP_HANDLE is not allowed from a non-PPL process to a PPL process. See Process Security and Access Rights
/// </para>
/// </param>
/// <param name="dwCreationFlags">
/// <para>The flags that control the priority class and the creation of the process. For a list of values, see Process Creation Flags.</para>
/// <para>
/// This parameter also controls the new process's priority class, which is used to determine the scheduling priorities of the process's threads. For a
/// list of values, see <c>GetPriorityClass</c>. If none of the priority class flags is specified, the priority class defaults to
/// <c>NORMAL_PRIORITY_CLASS</c> unless the priority class of the creating process is <c>IDLE_PRIORITY_CLASS</c> or <c>BELOW_NORMAL_PRIORITY_CLASS</c>.
/// In this case, the child process receives the default priority class of the calling process.
/// </para>
/// </param>
/// <param name="lpEnvironment">
/// <para>
/// A pointer to an environment block for the new process. If this parameter is <c>NULL</c>, the new process uses the environment of the calling process.
/// </para>
/// <para>An environment block consists of a null-terminated block of null-terminated strings. Each string is in the following form:</para>
/// <para>name=value\0</para>
/// <para>Because the equal sign is used as a separator, it must not be used in the name of an environment variable.</para>
/// <para>
/// An environment block can contain either Unicode or ANSI characters. If the environment block pointed to by lpEnvironment contains Unicode characters,
/// be sure that dwCreationFlags includes <c>CREATE_UNICODE_ENVIRONMENT</c>. If this parameter is <c>NULL</c> and the environment block of the parent
/// process contains Unicode characters, you must also ensure that dwCreationFlags includes <c>CREATE_UNICODE_ENVIRONMENT</c>.
/// </para>
/// <para>
/// The ANSI version of this function, <c>CreateProcessAsUserA</c> fails if the total size of the environment block for the process exceeds 32,767 characters.
/// </para>
/// <para>
/// Note that an ANSI environment block is terminated by two zero bytes: one for the last string, one more to terminate the block. A Unicode environment
/// block is terminated by four zero bytes: two for the last string, two more to terminate the block.
/// </para>
/// <para>
/// <c>Windows Server 2003 and Windows XP:</c> If the size of the combined user and system environment variable exceeds 8192 bytes, the process created
/// by <c>CreateProcessAsUser</c> no longer runs with the environment block passed to the function by the parent process. Instead, the child process runs
/// with the environment block returned by the <c>CreateEnvironmentBlock</c> function.
/// </para>
/// <para>To retrieve a copy of the environment block for a given user, use the <c>CreateEnvironmentBlock</c> function.</para>
/// </param>
/// <param name="lpCurrentDirectory">
/// <para>The full path to the current directory for the process. The string can also specify a UNC path.</para>
/// <para>
/// If this parameter is NULL, the new process will have the same current drive and directory as the calling process. (This feature is provided primarily
/// for shells that need to start an application and specify its initial drive and working directory.)
/// </para>
/// </param>
/// <param name="lpStartupInfo">
/// <para>A pointer to a <c>STARTUPINFO</c> or <c>STARTUPINFOEX</c> structure.</para>
/// <para>
/// The user must have full access to both the specified window station and desktop. If you want the process to be interactive, specify winsta0\default.
/// If the <c>lpDesktop</c> member is NULL, the new process inherits the desktop and window station of its parent process. If this member is an empty
/// string, "", the new process connects to a window station using the rules described in Process Connection to a Window Station.
/// </para>
/// <para>To set extended attributes, use a <c>STARTUPINFOEX</c> structure and specify <c>EXTENDED_STARTUPINFO_PRESENT</c> in the dwCreationFlags parameter.</para>
/// <para>Handles in <c>STARTUPINFO</c> or <c>STARTUPINFOEX</c> must be closed with <c>CloseHandle</c> when they are no longer needed.</para>
/// </param>
/// <param name="lpProcessInformation">
/// <para>A pointer to a <c>PROCESS_INFORMATION</c> structure that receives identification information about the new process.</para>
/// <para>Handles in <c>PROCESS_INFORMATION</c> must be closed with <c>CloseHandle</c> when they are no longer needed.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// Note that the function returns before the process has finished initialization. If a required DLL cannot be located or fails to initialize, the
/// process is terminated. To get the termination status of a process, call <c>GetExitCodeProcess</c>.
/// <para>Creates a thread that runs in the virtual address space of another process.</para>
/// <para>
/// Use the <c>CreateRemoteThreadEx</c> function to create a thread that runs in the virtual address space of another process and optionally specify
/// extended attributes.
/// </para>
/// </summary>
/// <param name="hProcess">
/// A handle to the process in which the thread is to be created. The handle must have the <c>PROCESS_CREATE_THREAD</c>,
/// <c>PROCESS_QUERY_INFORMATION</c>, <c>PROCESS_VM_OPERATION</c>, <c>PROCESS_VM_WRITE</c>, and <c>PROCESS_VM_READ</c> access rights, and may fail
/// without these rights on certain platforms. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="lpThreadAttributes">
/// <para>
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that specifies a security descriptor for the new thread and determines whether child processes
/// can inherit the returned handle. If lpThreadAttributes is NULL, the thread gets a default security descriptor and the handle cannot be inherited. The
/// access control lists (ACL) in the default security descriptor for a thread come from the primary token of the creator.
/// </para>
/// <para>
/// <c>Windows XP:</c> The ACLs in the default security descriptor for a thread come from the primary or impersonation token of the creator. This
/// behavior changed with Windows XP with SP2 and Windows Server 2003.
/// </para>
/// </param>
/// <param name="dwStackSize">
/// The initial size of the stack, in bytes. The system rounds this value to the nearest page. If this parameter is 0 (zero), the new thread uses the
/// default size for the executable. For more information, see Thread Stack Size.
/// </param>
/// <param name="lpStartAddress">
/// A pointer to the application-defined function of type <c>LPTHREAD_START_ROUTINE</c> to be executed by the thread and represents the starting address
/// of the thread in the remote process. The function must exist in the remote process. For more information, see <c>ThreadProc</c>.
/// </param>
/// <param name="lpParameter">A pointer to a variable to be passed to the thread function.</param>
/// <param name="dwCreationFlags">
/// <para>The flags that control the creation of the thread.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>The thread runs immediately after creation.</term>
/// </item>
/// <item>
/// <term>CREATE_SUSPENDED0x00000004</term>
/// <term>The thread is created in a suspended state, and does not run until the ResumeThread function is called.</term>
/// The dwStackSize parameter specifies the initial reserve size of the stack. If this flag is not specified, dwStackSize specifies the commit size.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpThreadId">
/// <para>A pointer to a variable that receives the thread identifier.</para>
/// <para>If this parameter is <c>NULL</c>, the thread identifier is not returned.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is a handle to the new thread.</para>
/// <para>If the function fails, the return value is <c>NULL</c>. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// Note that <c>CreateRemoteThread</c> may succeed even if lpStartAddress points to data, code, or is not accessible. If the start address is invalid
/// when the thread runs, an exception occurs, and the thread terminates. Thread termination due to a invalid start address is handled as an error exit
/// for the thread's process. This behavior is similar to the asynchronous nature of <c>CreateProcess</c>, where the process is created even if it refers
/// to invalid or missing dynamic-link libraries (DLL).
/// Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.
/// </summary>
/// <param name="hProcess">
/// A handle to the process in which the thread is to be created. The handle must have the PROCESS_CREATE_THREAD, PROCESS_QUERY_INFORMATION,
/// PROCESS_VM_OPERATION, PROCESS_VM_WRITE, and PROCESS_VM_READ access rights. In Windows 10, version 1607, your code must obtain these access rights for
/// the new handle. However, starting in Windows 10, version 1703, if the new handle is entitled to these access rights, the system obtains them for you.
/// For more information, see Process Security and Access Rights.
/// </param>
/// <param name="lpThreadAttributes">
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that specifies a security descriptor for the new thread and determines whether child processes
/// can inherit the returned handle. If lpThreadAttributes is NULL, the thread gets a default security descriptor and the handle cannot be inherited. The
/// access control lists (ACL) in the default security descriptor for a thread come from the primary token of the creator.
/// </param>
/// <param name="dwStackSize">
/// The initial size of the stack, in bytes. The system rounds this value to the nearest page. If this parameter is 0 (zero), the new thread uses the
/// default size for the executable. For more information, see Thread Stack Size.
/// </param>
/// <param name="lpStartAddress">
/// A pointer to the application-defined function of type <c>LPTHREAD_START_ROUTINE</c> to be executed by the thread and represents the starting address
/// of the thread in the remote process. The function must exist in the remote process. For more information, see <c>ThreadProc</c>.
/// </param>
/// <param name="lpParameter">A pointer to a variable to be passed to the thread function pointed to by lpStartAddress. This parameter can be NULL.</param>
/// <param name="dwCreationFlags">
/// <para>The flags that control the creation of the thread.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>The thread runs immediately after creation.</term>
/// </item>
/// <item>
/// <term>CREATE_SUSPENDED0x00000004</term>
/// <term>The thread is created in a suspended state and does not run until the ResumeThread function is called.</term>
/// The dwStackSize parameter specifies the initial reserve size of the stack. If this flag is not specified, dwStackSize specifies the commit size.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpAttributeList">
/// An attribute list that contains additional parameters for the new thread. This list is created by the <c>InitializeProcThreadAttributeList</c> function.
/// </param>
/// <param name="lpThreadId">
/// <para>A pointer to a variable that receives the thread identifier.</para>
/// <para>If this parameter is NULL, the thread identifier is not returned.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is a handle to the new thread.</para>
/// <para>If the function fails, the return value is NULL. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>Creates a thread to execute within the virtual address space of the calling process.</para>
/// <para>To create a thread that runs in the virtual address space of another process, use the <c>CreateRemoteThread</c> function.</para>
/// </summary>
/// <param name="lpThreadAttributes">
/// <para>
/// A pointer to a <c>SECURITY_ATTRIBUTES</c> structure that determines whether the returned handle can be inherited by child processes. If
/// lpThreadAttributes is NULL, the handle cannot be inherited.
/// </para>
/// <para>
/// The <c>lpSecurityDescriptor</c> member of the structure specifies a security descriptor for the new thread. If lpThreadAttributes is NULL, the thread
/// gets a default security descriptor. The ACLs in the default security descriptor for a thread come from the primary token of the creator.
/// </para>
/// </param>
/// <param name="dwStackSize">
/// The initial size of the stack, in bytes. The system rounds this value to the nearest page. If this parameter is zero, the new thread uses the default
/// size for the executable. For more information, see Thread Stack Size.
/// </param>
/// <param name="lpStartAddress">
/// A pointer to the application-defined function to be executed by the thread. This pointer represents the starting address of the thread. For more
/// information on the thread function, see <c>ThreadProc</c>.
/// </param>
/// <param name="lpParameter">A pointer to a variable to be passed to the thread.</param>
/// <param name="dwCreationFlags">
/// <para>The flags that control the creation of the thread.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>The thread runs immediately after creation.</term>
/// </item>
/// <item>
/// <term>CREATE_SUSPENDED0x00000004</term>
/// <term>The thread is created in a suspended state, and does not run until the ResumeThread function is called.</term>
/// The dwStackSize parameter specifies the initial reserve size of the stack. If this flag is not specified, dwStackSize specifies the commit size.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpThreadId">
/// A pointer to a variable that receives the thread identifier. If this parameter is <c>NULL</c>, the thread identifier is not returned.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is a handle to the new thread.</para>
/// <para>If the function fails, the return value is <c>NULL</c>. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// Note that <c>CreateThread</c> may succeed even if lpStartAddress points to data, code, or is not accessible. If the start address is invalid when the
/// thread runs, an exception occurs, and the thread terminates. Thread termination due to a invalid start address is handled as an error exit for the
/// thread's process. This behavior is similar to the asynchronous nature of <c>CreateProcess</c>, where the process is created even if it refers to
/// invalid or missing dynamic-link libraries (DLLs).
/// <summary>Retrieves the processor group and number of the logical processor in which the calling thread is running.</summary>
/// <param name="ProcNumber">
/// A pointer to a <c>PROCESSOR_NUMBER</c> structure that receives the processor group to which the logical processor is assigned and the number of the
/// logical processor within its group.
/// </param>
/// <returns>
/// If the function succeeds, the ProcNumber parameter contains the group and processor number of the processor on which the calling thread is running.
/// <summary>Retrieves a pseudo handle for the calling thread.</summary>
/// <returns>The return value is a pseudo handle for the current thread.</returns>
/// <remarks>
/// A pseudo handle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself
/// whenever a thread handle is required. Pseudo handles are not inherited by child processes.
/// <para>This handle has the THREAD_ALL_ACCESS access right to the thread object. For more information, see Thread Security and Access Rights.</para>
/// <para>
/// Windows Server 2003 and Windows XP: This handle has the maximum access allowed by the security descriptor of the thread to the primary token of the process.
/// </para>
/// <para>
/// The function cannot be used by one thread to create a handle that can be used by other threads to refer to the first thread. The handle is always
/// interpreted as referring to the thread that is using it. A thread can create a "real" handle to itself that can be used by other threads, or
/// inherited by other processes, by specifying the pseudo handle as the source handle in a call to the DuplicateHandle function.
/// </para>
/// <para>
/// The pseudo handle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect. If the pseudo
/// handle is duplicated by DuplicateHandle, the duplicate handle must be closed.
/// </para>
/// <para>
/// Do not create a thread while impersonating a security context. The call will succeed, however the newly created thread will have reduced access
/// rights to itself when calling GetCurrentThread. The access rights granted this thread will be derived from the access rights the impersonated user
/// has to the process. Some access rights including THREAD_SET_THREAD_TOKEN and THREAD_GET_CONTEXT may not be present, leading to unexpected failures.
/// Retrieves a pseudo-handle that you can use as a shorthand way to refer to the token that is currently in effect for the thread, which is the thread
/// token if one exists and the process token otherwise.
/// </summary>
/// <returns>A pseudo-handle that you can use as a shorthand way to refer to the token that is currently in effect for the thread.</returns>
/// <summary>Retrieves a pseudo-handle that you can use as a shorthand way to refer to the impersonation token that was assigned to the current thread.</summary>
/// <returns>A pseudo-handle that you can use as a shorthand way to refer to the impersonation token that was assigned to the current thread.</returns>
/// <summary>Retrieves the termination status of the specified process.</summary>
/// <param name="hProcess">
/// <para>A handle to the process.</para>
/// <para>
/// The handle must have the <c>PROCESS_QUERY_INFORMATION</c> or <c>PROCESS_QUERY_LIMITED_INFORMATION</c> access right. For more information, see Process
/// Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>PROCESS_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <param name="lpExitCode">A pointer to a variable to receive the process termination status. For more information, see Remarks.</param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Retrieves the priority class for the specified process. This value, together with the priority value of each thread of the process, determines each
/// thread's base priority level.
/// </summary>
/// <param name="hProcess">
/// <para>A handle to the process.</para>
/// <para>
/// The handle must have the <c>PROCESS_QUERY_INFORMATION</c> or <c>PROCESS_QUERY_LIMITED_INFORMATION</c> access right. For more information, see Process
/// Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>PROCESS_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is the priority class of the specified process.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>The process's priority class is one of the following values.</para>
/// <term>Process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS.</term>
/// </item>
/// <item>
/// <term>HIGH_PRIORITY_CLASS0x00000080</term>
/// <term>
/// Process that performs time-critical tasks that must be executed immediately for it to run correctly. The threads of a high-priority class process
/// preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user,
/// regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class CPU-bound
/// application can use nearly all available cycles.
/// </term>
/// </item>
/// <item>
/// <term>IDLE_PRIORITY_CLASS0x00000040</term>
/// <term>
/// Process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An example
/// is a screen saver. The idle priority class is inherited by child processes.
/// </term>
/// </item>
/// <item>
/// <term>NORMAL_PRIORITY_CLASS0x00000020</term>
/// <term>Process with no special scheduling needs.</term>
/// Process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes,
/// including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval
/// can cause disk caches not to flush or cause the mouse to be unresponsive.
/// Retrieves the list of CPU Sets in the process default set that was set by <c>SetProcessDefaultCpuSets</c>. If no default CPU Sets are set for a given
/// process, then the <c>RequiredIdCount</c> is set to 0 and the function succeeds.
/// </summary>
/// <param name="Process">
/// Specifies a process handle for the process to query. This handle must have the PROCESS_QUERY_LIMITED_INFORMATION access right. The value returned by
/// <c>GetCurrentProcess</c> can also be specified here.
/// </param>
/// <param name="CpuSetIds">Specifies an optional buffer to retrieve the list of CPU Set identifiers.</param>
/// <param name="CpuSetIdCount">Specifies the capacity of the buffer specified in <c>CpuSetIds</c>. If the buffer is NULL, this must be 0.</param>
/// <param name="RequiredIdCount">
/// Specifies the required capacity of the buffer to hold the entire list of process default CPU Sets. On successful return, this specifies the number of
/// IDs filled into the buffer.
/// </param>
/// <returns>
/// This API returns TRUE on success. If the buffer is not large enough the API returns FALSE, and the <c>GetLastError</c> value is
/// ERROR_INSUFFICIENT_BUFFER. This API cannot fail when passed valid parameters and the return buffer is large enough.
/// Retrieves the list of CPU Sets in the process default set that was set by <c>SetProcessDefaultCpuSets</c>. If no default CPU Sets are set for a given
/// process, then an empty array is returned.
/// </summary>
/// <param name="Process">
/// Specifies a process handle for the process to query. This handle must have the PROCESS_QUERY_LIMITED_INFORMATION access right. The value returned by
/// <c>GetCurrentProcess</c> can also be specified here.
/// </param>
/// <returns>The list of CPU Set identifiers.</returns>
/// <summary>Retrieves the process identifier of the specified process.</summary>
/// <param name="Process">
/// <para>
/// A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information,
/// see Process Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the PROCESS_QUERY_INFORMATION access right.</para>
/// <summary>Retrieves the process identifier of the process associated with the specified thread.</summary>
/// <param name="Thread">
/// <para>
/// A handle to the thread. The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see
/// Thread Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003:</c> The handle must have the THREAD_QUERY_INFORMATION access right.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is the process identifier of the process associated with the specified thread.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves information about the specified process.</summary>
/// <param name="hProcess">
/// A handle to the process. This handle must have the <c>PROCESS_SET_INFORMATION</c> access right. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="ProcessInformationClass">The kind of information to retrieve. The only supported value is <c>ProcessMemoryPriority</c></param>
/// <param name="ProcessInformation">
/// <para>Pointer to an object to receive the type of information specified by the ProcessInformationClass parameter.</para>
/// <para>
/// If the ProcessInformationClass parameter is <c>ProcessMemoryPriority</c>, this parameter must point to a <c>MEMORY_PRIORITY_INFORMATION</c> structure.
/// </para>
/// <para>
/// If the ProcessInformationClass parameter is <c>ProcessPowerThrottling</c>, this parameter must point to a <c>PROCESS_POWER_THROTTLING_STATE</c> structure.
/// </para>
/// <para>
/// If the ProcessInformationClass parameter is <c>ProcessProtectionLevelInfo</c>, this parameter must point to a
/// <para>If the ProcessInformationClass parameter is <c>ProcessAppMemoryInfo</c>, this parameter must point to a <c>APP_MEMORY_INFORMATION</c> structure.</para>
/// </param>
/// <param name="ProcessInformationSize">
/// <para>The size in bytes of the structure specified by the ProcessInformation parameter.</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessMemoryPriority</c>, this parameter must be .</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessPowerThrottling</c>, this parameter must be .</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessProtectionLevelInfo</c>, this parameter must be .</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessAppMemoryInfo</c>, this parameter must be .</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves mitigation policy settings for the calling process.</summary>
/// <param name="hProcess">
/// A handle to the process. This handle must have the PROCESS_QUERY_INFORMATION access right. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="MitigationPolicy">
/// <para>The mitigation policy to retrieve. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ProcessDEPPolicy</term>
/// <term>
/// The data execution prevention (DEP) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_DEP_POLICY structure that specifies
/// the DEP policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessASLRPolicy</term>
/// <term>
/// The Address Space Layout Randomization (ASLR) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_ASLR_POLICY structure that
/// specifies the ASLR policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessDynamicCodePolicy</term>
/// <term>
/// The dynamic code policy of the process. When turned on, the process cannot generate dynamic code or modify existing executable code.The lpBuffer
/// parameter points to a PROCESS_MITIGATION_DYNAMIC_CODE_POLICY structure that specifies the dynamic code policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessStrictHandleCheckPolicy</term>
/// <term>
/// The process will receive a fatal error if it manipulates a handle that is not valid.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY structure that specifies the handle check policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSystemCallDisablePolicy</term>
/// <term>
/// Disables the ability to use NTUser/GDI functions at the lowest layer.The lpBuffer parameter points to a PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY
/// structure that specifies the system call disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessMitigationOptionsMask</term>
/// <term>
/// Returns the mask of valid bits for all the mitigation options on the system. An application can set many mitigation options without querying the
/// operating system for mitigation options by combining bitwise with the mask to exclude all non-supported bits at once.The lpBuffer parameter points to
/// a ULONG64 bit vector for the mask, or a two-element array of ULONG64 bit vectors.
/// Prevents certain built-in third party extension points from being enabled, preventing legacy extension point DLLs from being loaded into the
/// process.The lpBuffer parameter points to a PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY structure that specifies the extension point disable
/// policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessControlFlowGuardPolicy</term>
/// <term>
/// The Control Flow Guard (CFG) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY structure that
/// specifies the CFG policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSignaturePolicy</term>
/// <term>
/// The policy of a process that can restrict image loading to those images that are either signed by Microsoft, by the Windows Store, or by Microsoft,
/// the Windows Store and the Windows Hardware Quality Labs (WHQL).he lpBuffer parameter points to a PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY structure
/// that specifies the signature policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessFontDisablePolicy</term>
/// <term>
/// The policy regarding font loading for the process. When turned on, the process cannot load non-system fonts.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_FONT_DISABLE_POLICY structure that specifies the policy flags for font loading.
/// </term>
/// </item>
/// <item>
/// <term>ProcessImageLoadPolicy</term>
/// <term>
/// The policy regarding image loading for the process, which determines the types of executable images that are allowed to be mapped into the process.
/// When turned on, images cannot be loaded from some locations, such a remote devices or files that have the low mandatory label.The lpBuffer parameter
/// points to a PROCESS_MITIGATION_IMAGE_LOAD_POLICY structure that specifies the policy flags for image loading.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpBuffer">
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessDEPPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_DEP_POLICY</c> structure that receives
/// the DEP policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessASLRPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_ASLR_POLICY</c> structure that
/// receives the ASLR policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessDynamicCodePolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_DYNAMIC_CODE_POLICY</c>
/// structure that receives the dynamic code policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessStrictHandleCheckPolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY</c> structure that specifies the handle check policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessSystemCallDisablePolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY</c> structure that specifies the system call disable policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessMitigationOptionsMask</c>, this parameter points to a <c>ULONG64</c> bit vector for the mask or a
/// two-element array of <c>ULONG64</c> bit vectors.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessExtensionPointDisablePolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY</c> structure that specifies the extension point disable policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessControlFlowGuardPolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY</c> structure that specifies the CFG policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessSignaturePolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY</c>
/// structure that receives the signature policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessFontDisablePolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_FONT_DISABLE_POLICY</c>
/// structure that receives the policy flags for font loading.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessImageLoadPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_IMAGE_LOAD_POLICY</c> structure
/// that receives the policy flags for image loading.
/// </para>
/// </param>
/// <param name="dwLength">The size of lpBuffer, in bytes.</param>
/// <returns>
/// If the function succeeds, it returns <c>TRUE</c>. If the function fails, it returns <c>FALSE</c>. To retrieve error values defined for this function,
/// <summary>Retrieves mitigation policy settings for the calling process.</summary>
/// <typeparam name="T">The type of the value to retrieve.</typeparam>
/// <param name="hProcess">
/// A handle to the process. This handle must have the PROCESS_QUERY_INFORMATION access right. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="MitigationPolicy">
/// <para>The mitigation policy to retrieve. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ProcessDEPPolicy</term>
/// <term>
/// The data execution prevention (DEP) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_DEP_POLICY structure that specifies
/// the DEP policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessASLRPolicy</term>
/// <term>
/// The Address Space Layout Randomization (ASLR) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_ASLR_POLICY structure that
/// specifies the ASLR policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessDynamicCodePolicy</term>
/// <term>
/// The dynamic code policy of the process. When turned on, the process cannot generate dynamic code or modify existing executable code.The lpBuffer
/// parameter points to a PROCESS_MITIGATION_DYNAMIC_CODE_POLICY structure that specifies the dynamic code policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessStrictHandleCheckPolicy</term>
/// <term>
/// The process will receive a fatal error if it manipulates a handle that is not valid.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY structure that specifies the handle check policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSystemCallDisablePolicy</term>
/// <term>
/// Disables the ability to use NTUser/GDI functions at the lowest layer.The lpBuffer parameter points to a PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY
/// structure that specifies the system call disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessMitigationOptionsMask</term>
/// <term>
/// Returns the mask of valid bits for all the mitigation options on the system. An application can set many mitigation options without querying the
/// operating system for mitigation options by combining bitwise with the mask to exclude all non-supported bits at once.The lpBuffer parameter points to
/// a ULONG64 bit vector for the mask, or a two-element array of ULONG64 bit vectors.
/// Prevents certain built-in third party extension points from being enabled, preventing legacy extension point DLLs from being loaded into the
/// process.The lpBuffer parameter points to a PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY structure that specifies the extension point disable
/// policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessControlFlowGuardPolicy</term>
/// <term>
/// The Control Flow Guard (CFG) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY structure that
/// specifies the CFG policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSignaturePolicy</term>
/// <term>
/// The policy of a process that can restrict image loading to those images that are either signed by Microsoft, by the Windows Store, or by Microsoft,
/// the Windows Store and the Windows Hardware Quality Labs (WHQL).he lpBuffer parameter points to a PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY structure
/// that specifies the signature policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessFontDisablePolicy</term>
/// <term>
/// The policy regarding font loading for the process. When turned on, the process cannot load non-system fonts.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_FONT_DISABLE_POLICY structure that specifies the policy flags for font loading.
/// </term>
/// </item>
/// <item>
/// <term>ProcessImageLoadPolicy</term>
/// <term>
/// The policy regarding image loading for the process, which determines the types of executable images that are allowed to be mapped into the process.
/// When turned on, images cannot be loaded from some locations, such a remote devices or files that have the low mandatory label.The lpBuffer parameter
/// points to a PROCESS_MITIGATION_IMAGE_LOAD_POLICY structure that specifies the policy flags for image loading.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="value">The value.</param>
/// <returns>
/// If the function succeeds, it returns <c>TRUE</c>. If the function fails, it returns <c>FALSE</c>. To retrieve error values defined for this function,
if(!isMask&&!CorrespondingTypeAttribute.CanGet(MitigationPolicy,typeof(T)))thrownewArgumentException($"{MitigationPolicy} cannot be used to get values of type {typeof(T)}.");
/// <summary>Retrieves the priority boost control state of the specified process.</summary>
/// <param name="hProcess">
/// <para>
/// A handle to the process. This handle must have the <c>PROCESS_QUERY_INFORMATION</c> or <c>PROCESS_QUERY_LIMITED_INFORMATION</c> access right. For
/// more information, see Process Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>PROCESS_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <param name="pDisablePriorityBoost">
/// A pointer to a variable that receives the priority boost control state. A value of TRUE indicates that dynamic boosting is disabled. A value of FALSE
/// indicates normal behavior.
/// </param>
/// <returns>
/// <para>
/// If the function succeeds, the return value is nonzero. In that case, the variable pointed to by the pDisablePriorityBoost parameter receives the
/// priority boost control state.
/// </para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <term>Application reserved first shutdown range.</term>
/// </item>
/// <item>
/// <term>400-4FF</term>
/// <term>System reserved first shutdown range.</term>
/// </item>
/// </list>
/// </para>
/// <para>All processes start at shutdown level 0x280.</para>
/// </param>
/// <param name="lpdwFlags">
/// <para>A pointer to a variable that receives the shutdown flags. This parameter can be the following value.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>SHUTDOWN_NORETRY0x00000001</term>
/// <term>
/// If this process takes longer than the specified timeout to shut down, do not display a retry dialog box for the user. Instead, just cause the process
/// to directly exit.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves timing information for the specified process.</summary>
/// <param name="hProcess">
/// <para>
/// A handle to the process whose timing information is sought. The handle must have the <c>PROCESS_QUERY_INFORMATION</c> or
/// <c>PROCESS_QUERY_LIMITED_INFORMATION</c> access right. For more information, see Process Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>PROCESS_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <param name="lpCreationTime">A pointer to a <c>FILETIME</c> structure that receives the creation time of the process.</param>
/// <param name="lpExitTime">
/// A pointer to a <c>FILETIME</c> structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined.
/// </param>
/// <param name="lpKernelTime">
/// A pointer to a <c>FILETIME</c> structure that receives the amount of time that the process has executed in kernel mode. The time that each of the
/// threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value.
/// </param>
/// <param name="lpUserTime">
/// A pointer to a <c>FILETIME</c> structure that receives the amount of time that the process has executed in user mode. The time that each of the
/// threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value. Note that this
/// value can exceed the amount of real time elapsed (between lpCreationTime and lpExitTime) if the process executes across multiple CPU cores.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves the major and minor version numbers of the system on which the specified process expects to run.</summary>
/// <param name="ProcessId">The process identifier of the process of interest. A value of zero specifies the calling process.</param>
/// <returns>
/// <para>
/// If the function succeeds, the return value is the version of the system on which the process expects to run. The high word of the return value
/// contains the major version number. The low word of the return value contains the minor version number.
/// </para>
/// <para>
/// If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>. The function fails if ProcessId is an
/// <summary>Retrieves the contents of the <c>STARTUPINFO</c> structure that was specified when the calling process was created.</summary>
/// <param name="lpStartupInfo">A pointer to a <c>STARTUPINFO</c> structure that receives the startup information.</param>
/// <returns>
/// <para>This function does not return a value.</para>
/// <para>
/// If an error occurs, the ANSI version of this function ( <c>GetStartupInfoA</c>) can raise an exception. The Unicode version ( <c>GetStartupInfoW</c>)
/// <summary>Allows an application to query the available CPU Sets on the system, and their current state.</summary>
/// <param name="Information">
/// A pointer to a <c>SYSTEM_CPU_SET_INFORMATION</c> structure that receives the CPU Set data. Pass NULL with a buffer length of 0 to determine the
/// required buffer size.
/// </param>
/// <param name="BufferLength">The length, in bytes, of the output buffer passed as the Information argument.</param>
/// <param name="ReturnedLength">
/// The length, in bytes, of the valid data in the output buffer if the buffer is large enough, or the required size of the output buffer. If no CPU Sets
/// exist, this value will be 0.
/// </param>
/// <param name="Process">
/// An optional handle to a process. This process is used to determine the value of the <c>AllocatedToTargetProcess</c> flag in the
/// SYSTEM_CPU_SET_INFORMATION structure. If a CPU Set is allocated to the specified process, the flag is set. Otherwise, it is clear. This handle must
/// have the PROCESS_QUERY_LIMITED_INFORMATION access right. The value returned by <c>GetCurrentProcess</c> may also be specified here.
/// </param>
/// <param name="Flags">Reserved, must be 0.</param>
/// <returns>
/// If the API succeeds it returns TRUE. If it fails, the error reason is available through <c>GetLastError</c>. If the Information buffer was NULL or
/// not large enough, the error code ERROR_INSUFFICIENT_BUFFER is returned. This API cannot fail when passed valid parameters and a buffer that is large
/// <summary>Allows an application to query the available CPU Sets on the system, and their current state.</summary>
/// <param name="Process">
/// An optional handle to a process. This process is used to determine the value of the <c>AllocatedToTargetProcess</c> flag in the
/// SYSTEM_CPU_SET_INFORMATION structure. If a CPU Set is allocated to the specified process, the flag is set. Otherwise, it is clear. This handle must
/// have the PROCESS_QUERY_LIMITED_INFORMATION access right. The value returned by <c>GetCurrentProcess</c> may also be specified here.
/// </param>
/// <returns>A <c>SYSTEM_CPU_SET_INFORMATION1</c> structure that receives the CPU Set data.</returns>
/// Retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors.
/// </summary>
/// <param name="lpIdleTime">A pointer to a <c>FILETIME</c> structure that receives the amount of time that the system has been idle.</param>
/// <param name="lpKernelTime">
/// A pointer to a <c>FILETIME</c> structure that receives the amount of time that the system has spent executing in Kernel mode (including all threads
/// in all processes, on all processors). This time value also includes the amount of time the system has been idle.
/// </param>
/// <param name="lpUserTime">
/// A pointer to a <c>FILETIME</c> structure that receives the amount of time that the system has spent executing in User mode (including all threads in
/// all processes, on all processors).
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>Retrieves the context of the specified thread.</para>
/// <para>A 64-bit application can retrieve the context of a WOW64 thread using the <c>Wow64GetThreadContext</c> function.</para>
/// </summary>
/// <param name="hThread">
/// <para>
/// A handle to the thread whose context is to be retrieved. The handle must have <c>THREAD_GET_CONTEXT</c> access to the thread. For more information,
/// see Thread Security and Access Rights.
/// </para>
/// <para><c>WOW64:</c> The handle must also have <c>THREAD_QUERY_INFORMATION</c> access.</para>
/// </param>
/// <param name="lpContext">
/// A pointer to a <c>CONTEXT</c> structure that receives the appropriate context of the specified thread. The value of the <c>ContextFlags</c> member of
/// this structure specifies which portions of a thread's context are retrieved. The <c>CONTEXT</c> structure is highly processor specific. Refer to the
/// WinNT.h header file for processor-specific definitions of this structures and any alignment requirements.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves the description that was assigned to a thread by calling <c>SetThreadDescription</c>.</summary>
/// <param name="hThread">A handle to the thread for which to retrieve the description. The handle must have THREAD_QUERY_LIMITED_INFORMATION access.</param>
/// <param name="threadDescription">A Unicode string that contains the description of the thread.</param>
/// <returns>
/// If the function succeeds, the return value is the <c>HRESULT</c> that denotes a successful operation.If the function fails, the return value is an
/// <summary>Retrieves the processor number of the ideal processor for the specified thread.</summary>
/// <param name="hThread">
/// A handle to the thread for which to retrieve the ideal processor. This handle must have been created with the THREAD_QUERY_LIMITED_INFORMATION access
/// right. For more information, see Thread Security and Access Rights.
/// </param>
/// <param name="lpIdealProcessor">Points to <c>PROCESSOR_NUMBER</c> structure to receive the number of the ideal processor.</param>
/// <returns>
/// <para>If the function succeeds, it returns a nonzero value.</para>
/// <para>If the function fails, it returns zero. To get extended error information, use <c>GetLastError</c>.</para>
/// <summary>Retrieves information about the specified thread.</summary>
/// <param name="hThread">
/// A handle to the thread. The handle must have THREAD_QUERY_INFORMATION access rights. For more information, see Thread Security and Access Rights.
/// </param>
/// <param name="ThreadInformationClass">The class of information to retrieve. The only supported values are <c>ThreadMemoryPriority</c> and <c>ThreadPowerThrottling</c>.</param>
/// <param name="ThreadInformation">
/// <para>Pointer to a structure to receive the type of information specified by the ThreadInformationClass parameter.</para>
/// <para>
/// If the ThreadInformationClass parameter is <c>ThreadMemoryPriority</c>, this parameter must point to a <c>MEMORY_PRIORITY_INFORMATION</c> structure.
/// </para>
/// <para>
/// If the ThreadInformationClass parameter is <c>ThreadPowerThrottling</c>, this parameter must point to a <c>THREAD_POWER_THROTTLING_STATE</c> structure.
/// </para>
/// </param>
/// <param name="ThreadInformationSize">
/// <para>The size in bytes of the structure specified by the ThreadInformation parameter.</para>
/// <para>If the ThreadInformationClass parameter is <c>ThreadMemoryPriority</c>, this parameter must be .</para>
/// <para>If the ThreadInformationClass parameter is <c>ThreadPowerThrottling</c>, this parameter must be .</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Retrieves the priority value for the specified thread. This value, together with the priority class of the thread's process, determines the thread's
/// base-priority level.
/// </summary>
/// <param name="hThread">
/// <para>A handle to the thread.</para>
/// <para>
/// The handle must have the <c>THREAD_QUERY_INFORMATION</c> or <c>THREAD_QUERY_LIMITED_INFORMATION</c> access right. For more information, see Thread
/// Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003:</c> The handle must have the <c>THREAD_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is the thread's priority level.</para>
/// <para>If the function fails, the return value is <c>THREAD_PRIORITY_ERROR_RETURN</c>. To get extended error information, call <c>GetLastError</c>.</para>
/// <para><c>Windows Phone 8.1:</c> This function will always return <c>THREAD_PRIORITY_NORMAL</c>.</para>
/// <para>The thread's priority level is one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Return code/value</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>THREAD_PRIORITY_ABOVE_NORMAL1</term>
/// <term>Priority 1 point above the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_BELOW_NORMAL-1</term>
/// <term>Priority 1 point below the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_HIGHEST2</term>
/// <term>Priority 2 points above the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_IDLE-15</term>
/// <term>
/// Base priority of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS
/// processes, and a base priority of 16 for REALTIME_PRIORITY_CLASS processes.
/// </term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_LOWEST-2</term>
/// <term>Priority 2 points below the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_NORMAL0</term>
/// <term>Normal priority for the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_TIME_CRITICAL15</term>
/// <term>
/// Base-priority level of 15 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or
/// HIGH_PRIORITY_CLASS processes, and a base-priority level of 31 for REALTIME_PRIORITY_CLASS processes.
/// </term>
/// </item>
/// </list>
/// </para>
/// <para>
/// If the thread has the <c>REALTIME_PRIORITY_CLASS</c> base class, this function can also return one of the following values: -7, -6, -5, -4, -3, 3, 4,
/// 5, or 6. For more information, see Scheduling Priorities.
/// </para>
/// </returns>
// int WINAPI GetThreadPriority( _In_ HANDLE hThread);// https://msdn.microsoft.com/en-us/library/windows/desktop/ms683235(v=vs.85).aspx
/// <summary>Retrieves the priority boost control state of the specified thread.</summary>
/// <param name="hThread">
/// <para>
/// A handle to the thread. The handle must have the <c>THREAD_QUERY_INFORMATION</c> or <c>THREAD_QUERY_LIMITED_INFORMATION</c> access right. For more
/// information, see Thread Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>THREAD_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <param name="pDisablePriorityBoost">
/// A pointer to a variable that receives the priority boost control state. A value of TRUE indicates that dynamic boosting is disabled. A value of FALSE
/// indicates normal behavior.
/// </param>
/// <returns>
/// <para>
/// If the function succeeds, the return value is nonzero. In that case, the variable pointed to by the pDisablePriorityBoost parameter receives the
/// priority boost control state.
/// </para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Returns the explicit CPU Set assignment of the specified thread, if any assignment was set using the <c>SetThreadSelectedCpuSets</c> API. If no
/// explicit assignment is set, <c>RequiredIdCount</c> is set to 0 and the function returns TRUE.
/// </summary>
/// <param name="Thread">
/// Specifies the thread for which to query the selected CPU Sets. This handle must have the THREAD_QUERY_LIMITED_INFORMATION access right. The value
/// returned by <c>GetCurrentThread</c> can also be specified here.
/// </param>
/// <param name="CpuSetIds">Specifies an optional buffer to retrieve the list of CPU Set identifiers.</param>
/// <param name="CpuSetIdCount">Specifies the capacity of the buffer specified in <c>CpuSetIds</c>. If the buffer is NULL, this must be 0.</param>
/// <param name="RequiredIdCount">
/// Specifies the required capacity of the buffer to hold the entire list of thread selected CPU Sets. On successful return, this specifies the number of
/// IDs filled into the buffer.
/// </param>
/// <returns>
/// This API returns TRUE on success. If the buffer is not large enough, the <c>GetLastError</c> value is ERROR_INSUFFICIENT_BUFFER. This API cannot fail
/// when passed valid parameters and the return buffer is large enough.
/// <summary>Retrieves timing information for the specified thread.</summary>
/// <param name="hThread">
/// <para>
/// A handle to the thread whose timing information is sought. The handle must have the <c>THREAD_QUERY_INFORMATION</c> or
/// <c>THREAD_QUERY_LIMITED_INFORMATION</c> access right. For more information, see Thread Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The handle must have the <c>THREAD_QUERY_INFORMATION</c> access right.</para>
/// </param>
/// <param name="lpCreationTime">A pointer to a <c>FILETIME</c> structure that receives the creation time of the thread.</param>
/// <param name="lpExitTime">
/// A pointer to a <c>FILETIME</c> structure that receives the exit time of the thread. If the thread has not exited, the content of this structure is undefined.
/// </param>
/// <param name="lpKernelTime">A pointer to a <c>FILETIME</c> structure that receives the amount of time that the thread has executed in kernel mode.</param>
/// <param name="lpUserTime">A pointer to a <c>FILETIME</c> structure that receives the amount of time that the thread has executed in user mode.</param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Initializes the specified list of attributes for process and thread creation.</summary>
/// <param name="lpAttributeList">
/// The attribute list. This parameter can be NULL to determine the buffer size required to support the specified number of attributes.
/// </param>
/// <param name="dwAttributeCount">The count of attributes to be added to the list.</param>
/// <param name="dwFlags">This parameter is reserved and must be zero.</param>
/// <param name="lpSize">
/// <para>
/// If lpAttributeList is not NULL, this parameter specifies the size in bytes of the lpAttributeList buffer on input. On output, this parameter receives
/// the size in bytes of the initialized attribute list.
/// </para>
/// <para>If lpAttributeList is NULL, this parameter receives the required buffer size in bytes.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Determines whether the specified process is considered critical.</summary>
/// <param name="hProcess">A handle to the process to query. The process must have been opened with <c>PROCESS_QUERY_LIMITED_INFORMATION</c> access.</param>
/// <param name="Critical">A pointer to the <c>BOOL</c> value this function will use to indicate whether the process is considered critical.</param>
/// <returns>
/// This routine returns FALSE on failure. Any other value indicates success. Call <c>GetLastError</c> to query for the specific error reason on failure.
/// <term>The VFP/Neon: 32 x 64bit register bank is present. This flag has the same meaning as PF_ARM_VFP_EXTENDED_REGISTERS.</term>
/// </item>
/// <item>
/// <term>PF_3DNOW_INSTRUCTIONS_AVAILABLE7</term>
/// <term>The 3D-Now instruction set is available.</term>
/// </item>
/// <item>
/// <term>PF_CHANNELS_ENABLED16</term>
/// <term>The processor channels are enabled.</term>
/// </item>
/// <item>
/// <term>PF_COMPARE_EXCHANGE_DOUBLE2</term>
/// <term>The atomic compare and exchange operation (cmpxchg) is available.</term>
/// </item>
/// <item>
/// <term>PF_COMPARE_EXCHANGE12814</term>
/// <term>The atomic compare and exchange 128-bit operation (cmpxchg16b) is available.Windows Server 2003 and Windows XP/2000: This feature is not supported.</term>
/// </item>
/// <item>
/// <term>PF_COMPARE64_EXCHANGE12815</term>
/// <term>
/// The atomic compare 64 and exchange 128-bit operation (cmp8xchg16) is available.Windows Server 2003 and Windows XP/2000: This feature is not supported.
/// </term>
/// </item>
/// <item>
/// <term>PF_FASTFAIL_AVAILABLE23</term>
/// <term>_fastfail() is available.</term>
/// </item>
/// <item>
/// <term>PF_FLOATING_POINT_EMULATED1</term>
/// <term>
/// Floating-point operations are emulated using a software emulator.This function returns a nonzero value if floating-point operations are emulated;
/// <term>On a Pentium, a floating-point precision error can occur in rare circumstances.</term>
/// </item>
/// <item>
/// <term>PF_MMX_INSTRUCTIONS_AVAILABLE3</term>
/// <term>The MMX instruction set is available.</term>
/// </item>
/// <item>
/// <term>PF_NX_ENABLED12</term>
/// <term>
/// Data execution prevention is enabled.Windows XP/2000: This feature is not supported until Windows XP with SP2 and Windows Server 2003 with SP1.
/// </term>
/// </item>
/// <item>
/// <term>PF_PAE_ENABLED9</term>
/// <term>
/// The processor is PAE-enabled. For more information, see Physical Address Extension.All x64 processors always return a nonzero value for this feature.
/// </term>
/// </item>
/// <item>
/// <term>PF_RDTSC_INSTRUCTION_AVAILABLE8</term>
/// <term>The RDTSC instruction is available.</term>
/// </item>
/// <item>
/// <term>PF_RDWRFSGSBASE_AVAILABLE22</term>
/// <term>RDFSBASE, RDGSBASE, WRFSBASE, and WRGSBASE instructions are available.</term>
/// <term>The SSE2 instruction set is available.Windows 2000: This feature is not supported.</term>
/// </item>
/// <item>
/// <term>PF_XSAVE_ENABLED17</term>
/// <term>
/// The processor implements the XSAVE and XRSTOR instructions.Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This feature
/// is not supported until Windows 7 and Windows Server 2008 R2.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <returns>
/// <para>If the feature is supported, the return value is a nonzero value.</para>
/// <para>If the feature is not supported, the return value is zero.</para>
/// <para>If the HAL does not support detection of the feature, whether or not the hardware supports the feature, the return value is also zero.</para>
/// <summary>Opens an existing local process object.</summary>
/// <param name="dwDesiredAccess">
/// <para>
/// The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of
/// the process access rights.
/// </para>
/// <para>If the caller has enabled the SeDebugPrivilege privilege, the requested access is granted regardless of the contents of the security descriptor.</para>
/// </param>
/// <param name="bInheritHandle">
/// If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
/// </param>
/// <param name="dwProcessId">
/// <para>The identifier of the local process to be opened.</para>
/// <para>
/// If the specified process is the System Process (0x00000000), the function fails and the last error code is ERROR_INVALID_PARAMETER. If the specified
/// process is the Idle process or one of the CSRSS processes, this function fails and the last error code is ERROR_ACCESS_DENIED because their access
/// restrictions prevent user-level code from opening them.
/// </para>
/// <para>
/// If you are using <c>GetCurrentProcessId</c> as an argument to this function, consider using <c>GetCurrentProcess</c> instead of OpenProcess, for
/// improved performance.
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is an open handle to the specified process.</para>
/// <para>If the function fails, the return value is NULL. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Opens an existing thread object.</summary>
/// <param name="dwDesiredAccess">
/// <para>
/// The access to the thread object. This access right is checked against the security descriptor for the thread. This parameter can be one or more of
/// the thread access rights.
/// </para>
/// <para>If the caller has enabled the SeDebugPrivilege privilege, the requested access is granted regardless of the contents of the security descriptor.</para>
/// </param>
/// <param name="bInheritHandle">
/// If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
/// </param>
/// <param name="dwThreadId">The identifier of the thread to be opened.</param>
/// <returns>
/// <para>If the function succeeds, the return value is an open handle to the specified thread.</para>
/// <para>If the function fails, the return value is NULL. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves the Remote Desktop Services session associated with a specified process.</summary>
/// <param name="dwProcessId">
/// Specifies a process identifier. Use the <c>GetCurrentProcessId</c> function to retrieve the process identifier for the current process.
/// </param>
/// <param name="pSessionId">
/// Pointer to a variable that receives the identifier of the Remote Desktop Services session under which the specified process is running. To retrieve
/// the identifier of the session currently attached to the console, use the <c>WTSGetActiveConsoleSessionId</c> function.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is a nonzero value.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Retrieves the affinity update mode of the specified process.</summary>
/// <param name="ProcessHandle">
/// A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information,
/// see Process Security and Access Rights.
/// </param>
/// <param name="lpdwFlags">
/// <para>The affinity update mode. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>Dynamic update of the process affinity by the system is disabled.</term>
/// <summary>Adds a user-mode asynchronous procedure call (APC) object to the APC queue of the specified thread.</summary>
/// <param name="pfnAPC">
/// A pointer to the application-supplied APC function to be called when the specified thread performs an alertable wait operation. For more information,
/// see <c>APCProc</c>.
/// </param>
/// <param name="hThread">
/// A handle to the thread. The handle must have the <c>THREAD_SET_CONTEXT</c> access right. For more information, see Synchronization Object Security
/// and Access Rights.
/// </param>
/// <param name="dwData">A single value that is passed to the APC function pointed to by the pfnAPC parameter.</param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para><c>Windows Server 2003 and Windows XP:</c> There are no error values defined for this function that can be retrieved by calling <c>GetLastError</c>.</para>
/// Sets the priority class for the specified process. This value together with the priority value of each thread of the process determines each thread's
/// base priority level.
/// </summary>
/// <param name="hProcess">
/// <para>A handle to the process.</para>
/// <para>The handle must have the <c>PROCESS_SET_INFORMATION</c> access right. For more information, see Process Security and Access Rights.</para>
/// </param>
/// <param name="dwPriorityClass">
/// <para>The priority class for the process. This parameter can be one of the following values.</para>
/// Begin background processing mode. The system lowers the resource scheduling priorities of the process (and its threads) so that it can perform
/// background work without significantly affecting activity in the foreground.This value can be specified only if hProcess is a handle to the current
/// process. The function fails if the process is already in background processing mode.Windows Server 2003 and Windows XP: This value is not supported.
/// End background processing mode. The system restores the resource scheduling priorities of the process (and its threads) as they were before the
/// process entered background processing mode.This value can be specified only if hProcess is a handle to the current process. The function fails if the
/// process is not in background processing mode.Windows Server 2003 and Windows XP: This value is not supported.
/// Process that has the highest possible priority. The threads of the process preempt the threads of all other processes, including operating system
/// processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to
/// flush or cause the mouse to be unresponsive.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Sets the default CPU Sets assignment for threads in the specified process. Threads that are created, which don’t have CPU Sets explicitly set using
/// <c>SetThreadSelectedCpuSets</c>, will inherit the sets specified by <c>SetProcessDefaultCpuSets</c> automatically.
/// </summary>
/// <param name="Process">
/// Specifies the process for which to set the default CPU Sets. This handle must have the PROCESS_SET_LIMITED_INFORMATION access right. The value
/// returned by <c>GetCurrentProcess</c> can also be specified here.
/// </param>
/// <param name="CpuSetIds">
/// Specifies the list of CPU Set IDs to set as the process default CPU set. If this is NULL, the <c>SetProcessDefaultCpuSets</c> clears out any assignment.
/// </param>
/// <param name="CpuSetIdCound">
/// Specifies the number of IDs in the list passed in the <c>CpuSetIds</c> argument. If that value is NULL, this should be 0.
/// </param>
/// <returns>This function cannot fail when passed valid parameters.</returns>
/// <summary>Sets information for the specified process.</summary>
/// <param name="hProcess">
/// A handle to the process. This handle must have the <c>PROCESS_SET_INFORMATION</c> access right. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="ProcessInformationClass">The class of information to set. The only supported values are <c>ProcessMemoryPriority</c> and <c>ProcessPowerThrottling</c>.</param>
/// <param name="ProcessInformation">
/// <para>Pointer to an object that contains the type of information specified by the ProcessInformationClass parameter.</para>
/// <para>
/// If the ProcessInformationClass parameter is <c>ProcessMemoryPriority</c>, this parameter must point to a <c>MEMORY_PRIORITY_INFORMATION</c> structure.
/// </para>
/// <para>
/// If the ProcessInformationClass parameter is <c>ProcessPowerThrottling</c>, this parameter must point to a <c>PROCESS_POWER_THROTTLING_STATE</c> structure.
/// </para>
/// </param>
/// <param name="ProcessInformationSize">
/// <para>The size in bytes of the structure specified by the ProcessInformation parameter.</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessMemoryPriority</c>, this parameter must be .</para>
/// <para>If the ProcessInformationClass parameter is <c>ProcessPowerThrottling</c>, this parameter must be .</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Sets a mitigation policy for the calling process. Mitigation policies enable a process to harden itself against various types of attacks.</summary>
/// <param name="MitigationPolicy">
/// <para>The mitigation policy to apply. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ProcessDEPPolicy</term>
/// <term>
/// The data execution prevention (DEP) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_DEP_POLICY structure that specifies
/// the DEP policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessASLRPolicy</term>
/// <term>
/// The Address Space Layout Randomization (ASLR) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_ASLR_POLICY structure that
/// specifies the ASLR policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessDynamicCodePolicy</term>
/// <term>
/// The dynamic code policy of the process. When turned on, the process cannot generate dynamic code or modify existing executable code.The lpBuffer
/// parameter points to a PROCESS_MITIGATION_DYNAMIC_CODE_POLICY structure that specifies the dynamic code policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessStrictHandleCheckPolicy</term>
/// <term>
/// The process will receive a fatal error if it manipulates a handle that is not valid.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY structure that specifies the handle check policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSystemCallDisablePolicy</term>
/// <term>
/// Disables the ability to use NTUser/GDI functions at the lowest layer.The lpBuffer parameter points to a PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY
/// structure that specifies the system call disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessMitigationOptionsMask</term>
/// <term>
/// Returns the mask of valid bits for all the mitigation options on the system. An application can set many mitigation options without querying the
/// operating system for mitigation options by combining bitwise with the mask to exclude all non-supported bits at once.The lpBuffer parameter points to
/// a ULONG64 bit vector for the mask, or to accommodate more than 64 bits, a two-element array of ULONG64 bit vectors.
/// The lpBuffer parameter points to a PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY structure that specifies the extension point disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessControlFlowGuardPolicy</term>
/// <term>
/// The Control Flow Guard (CFG) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY structure that
/// specifies the CFG policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSignaturePolicy</term>
/// <term>
/// The policy of a process that can restrict image loading to those images that are either signed by Microsoft, by the Windows Store, or by Microsoft,
/// the Windows Store and the Windows Hardware Quality Labs (WHQL).he lpBuffer parameter points to a PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY structure
/// that specifies the signature policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessFontDisablePolicy</term>
/// <term>
/// The policy regarding font loading for the process. When turned on, the process cannot load non-system fonts.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_FONT_DISABLE_POLICY structure that specifies the policy flags for font loading.
/// </term>
/// </item>
/// <item>
/// <term>ProcessImageLoadPolicy</term>
/// <term>
/// The policy regarding image loading for the process, which determines the types of executable images that are allowed to be mapped into the process.
/// When turned on, images cannot be loaded from some locations, such a remote devices or files that have the low mandatory label.The lpBuffer parameter
/// points to a PROCESS_MITIGATION_IMAGE_LOAD_POLICY structure that specifies the policy flags for image loading.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpBuffer">
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessDEPPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_DEP_POLICY</c> structure that
/// specifies the DEP policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessASLRPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_ASLR_POLICY</c> structure that
/// specifies the ASLR policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessImageLoadPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_IMAGE_LOAD_POLICY</c> structure
/// that receives the policy flags for image loading.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessStrictHandleCheckPolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY</c> structure that specifies the handle check policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessSystemCallDisablePolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY</c> structure that specifies the system call disable policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessMitigationOptionsMask</c>, this parameter points to a <c>ULONG64</c> bit vector for the mask, or to
/// accommodate more than 64 bits, a two-element array of <c>ULONG64</c> bit vectors.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessExtensionPointDisablePolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY</c> structure that specifies the extension point disable policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessControlFlowGuardPolicy</c>, this parameter points to a
/// <c>PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY</c> structure that specifies the CFG policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessSignaturePolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY</c>
/// structure that specifies the signature policy flags.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessFontDisablePolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_FONT_DISABLE_POLICY</c>
/// structure that specifies the policy flags for font loading.
/// </para>
/// <para>
/// If the MitigationPolicy parameter is <c>ProcessImageLoadPolicy</c>, this parameter points to a <c>PROCESS_MITIGATION_IMAGE_LOAD_POLICY</c> structure
/// that specifies the policy flags for image loading.
/// </para>
/// </param>
/// <param name="dwLength">The size of lpBuffer, in bytes.</param>
/// <returns>
/// If the function succeeds, it returns <c>TRUE</c>. If the function fails, it returns <c>FALSE</c>. To retrieve error values defined for this function,
/// <summary>Sets a mitigation policy for the calling process. Mitigation policies enable a process to harden itself against various types of attacks.</summary>
/// <typeparam name="T">The type of the value being set.</typeparam>
/// <param name="MitigationPolicy">
/// <para>The mitigation policy to apply. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ProcessDEPPolicy</term>
/// <term>
/// The data execution prevention (DEP) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_DEP_POLICY structure that specifies
/// the DEP policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessASLRPolicy</term>
/// <term>
/// The Address Space Layout Randomization (ASLR) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_ASLR_POLICY structure that
/// specifies the ASLR policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessDynamicCodePolicy</term>
/// <term>
/// The dynamic code policy of the process. When turned on, the process cannot generate dynamic code or modify existing executable code.The lpBuffer
/// parameter points to a PROCESS_MITIGATION_DYNAMIC_CODE_POLICY structure that specifies the dynamic code policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessStrictHandleCheckPolicy</term>
/// <term>
/// The process will receive a fatal error if it manipulates a handle that is not valid.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY structure that specifies the handle check policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSystemCallDisablePolicy</term>
/// <term>
/// Disables the ability to use NTUser/GDI functions at the lowest layer.The lpBuffer parameter points to a PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY
/// structure that specifies the system call disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessMitigationOptionsMask</term>
/// <term>
/// Returns the mask of valid bits for all the mitigation options on the system. An application can set many mitigation options without querying the
/// operating system for mitigation options by combining bitwise with the mask to exclude all non-supported bits at once.The lpBuffer parameter points to
/// a ULONG64 bit vector for the mask, or to accommodate more than 64 bits, a two-element array of ULONG64 bit vectors.
/// The lpBuffer parameter points to a PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY structure that specifies the extension point disable policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessControlFlowGuardPolicy</term>
/// <term>
/// The Control Flow Guard (CFG) policy of the process.The lpBuffer parameter points to a PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY structure that
/// specifies the CFG policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessSignaturePolicy</term>
/// <term>
/// The policy of a process that can restrict image loading to those images that are either signed by Microsoft, by the Windows Store, or by Microsoft,
/// the Windows Store and the Windows Hardware Quality Labs (WHQL).he lpBuffer parameter points to a PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY structure
/// that specifies the signature policy flags.
/// </term>
/// </item>
/// <item>
/// <term>ProcessFontDisablePolicy</term>
/// <term>
/// The policy regarding font loading for the process. When turned on, the process cannot load non-system fonts.The lpBuffer parameter points to a
/// PROCESS_MITIGATION_FONT_DISABLE_POLICY structure that specifies the policy flags for font loading.
/// </term>
/// </item>
/// <item>
/// <term>ProcessImageLoadPolicy</term>
/// <term>
/// The policy regarding image loading for the process, which determines the types of executable images that are allowed to be mapped into the process.
/// When turned on, images cannot be loaded from some locations, such a remote devices or files that have the low mandatory label.The lpBuffer parameter
/// points to a PROCESS_MITIGATION_IMAGE_LOAD_POLICY structure that specifies the policy flags for image loading.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="value">The value. This must correspond to the <paramref name="MitigationPolicy"/> value.</param>
/// <returns>
/// If the function succeeds, it returns <c>TRUE</c>. If the function fails, it returns <c>FALSE</c>. To retrieve error values defined for this function,
if(!CorrespondingTypeAttribute.CanSet(MitigationPolicy,typeof(T)))thrownewArgumentException($"{MitigationPolicy} cannot be used to set values of type {typeof(T)}.");
/// <summary>Disables or enables the ability of the system to temporarily boost the priority of the threads of the specified process.</summary>
/// <param name="hProcess">
/// A handle to the process. This handle must have the PROCESS_SET_INFORMATION access right. For more information, see Process Security and Access Rights.
/// </param>
/// <param name="DisablePriorityBoost">If this parameter is TRUE, dynamic boosting is disabled. If the parameter is FALSE, dynamic boosting is enabled.</param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Sets shutdown parameters for the currently calling process. This function sets a shutdown order for a process relative to the other processes in the system.
/// </summary>
/// <param name="dwLevel">
/// <para>
/// The shutdown priority for a process relative to other processes in the system. The system shuts down processes from high dwLevel values to low. The
/// highest and lowest shutdown priorities are reserved for system components. This parameter must be in the following range of values.
/// </para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>000-0FF</term>
/// <term>System reserved last shutdown range.</term>
/// </item>
/// <item>
/// <term>100-1FF</term>
/// <term>Application reserved last shutdown range.</term>
/// <para>Sets the context for the specified thread.</para>
/// <para>A 64-bit application can set the context of a WOW64 thread using the <c>Wow64SetThreadContext</c> function.</para>
/// </summary>
/// <param name="hThread">
/// A handle to the thread whose context is to be set. The handle must have the <c>THREAD_SET_CONTEXT</c> access right to the thread. For more
/// information, see Thread Security and Access Rights.
/// </param>
/// <param name="lpContext">
/// A pointer to a <c>CONTEXT</c> structure that contains the context to be set in the specified thread. The value of the <c>ContextFlags</c> member of
/// this structure specifies which portions of a thread's context to set. Some values in the <c>CONTEXT</c> structure that cannot be specified are
/// silently set to the correct value. This includes bits in the CPU status register that specify the privileged processor mode, global enabling bits in
/// the debugging register, and other states that must be controlled by the operating system.
/// </param>
/// <returns>
/// <para>If the context was set, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>Assigns a description to a thread.</summary>
/// <param name="hThread">A handle for the thread for which you want to set the description. The handle must have THREAD_SET_LIMITED_INFORMATION access.</param>
/// <param name="lpThreadDescription">A Unicode string that specifies the description of the thread.</param>
/// <returns>
/// If the function succeeds, the return value is the <c>HRESULT</c> that denotes a successful operation.If the function fails, the return value is an
/// <summary>Sets the ideal processor for the specified thread and optionally retrieves the previous ideal processor.</summary>
/// <param name="hThread">
/// A handle to the thread for which to set the ideal processor. This handle must have been created with the THREAD_SET_INFORMATION access right. For
/// more information, see Thread Security and Access Rights.
/// </param>
/// <param name="lpIdealProcessor">A pointer to a PROCESSOR_NUMBER structure that specifies the processor number of the desired ideal processor.</param>
/// <param name="lpPreviousIdealProcessor">
/// A pointer to a PROCESSOR_NUMBER structure to receive the previous ideal processor. This parameter can point to the same memory location as the
/// lpIdealProcessor parameter. This parameter can be NULL if the previous ideal processor is not required.
/// </param>
/// <returns>
/// If the function succeeds, it returns a nonzero value. If the function fails, it returns zero.To get extended error information, use GetLastError.
/// <summary>Sets information for the specified thread.</summary>
/// <param name="hThread">
/// A handle to the thread. The handle must have THREAD_QUERY_INFORMATION access right. For more information, see Thread Security and Access Rights.
/// </param>
/// <param name="ThreadInformationClass">The class of information to set. The only supported values are <c>ThreadMemoryPriority</c> and <c>ThreadPowerThrottling</c>.</param>
/// <param name="ThreadInformation">
/// <para>Pointer to a structure that contains the type of information specified by the ThreadInformationClass parameter.</para>
/// <para>
/// If the ThreadInformationClass parameter is <c>ThreadMemoryPriority</c>, this parameter must point to a <c>MEMORY_PRIORITY_INFORMATION</c> structure.
/// </para>
/// <para>
/// If the ThreadInformationClass parameter is <c>ThreadPowerThrottling</c>, this parameter must point to a <c>THREAD_POWER_THROTTLING_STATE</c> structure.
/// </para>
/// </param>
/// <param name="ThreadInformationSize">
/// <para>The size in bytes of the structure specified by the ThreadInformation parameter.</para>
/// <para>If the ThreadInformationClass parameter is <c>ThreadMemoryPriority</c>, this parameter must be .</para>
/// <para>If the ThreadInformationClass parameter is <c>ThreadPowerThrottling</c>, this parameter must be .</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Sets the priority value for the specified thread. This value, together with the priority class of the thread's process, determines the thread's base
/// priority level.
/// </summary>
/// <param name="hThread">
/// <para>A handle to the thread whose priority value is to be set.</para>
/// <para>
/// The handle must have the <c>THREAD_SET_INFORMATION</c> or <c>THREAD_SET_LIMITED_INFORMATION</c> access right. For more information, see Thread
/// Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003:</c> The handle must have the <c>THREAD_SET_INFORMATION</c> access right.</para>
/// </param>
/// <param name="nPriority">
/// <para>The priority value for the thread. This parameter can be one of the following values.</para>
/// Begin background processing mode. The system lowers the resource scheduling priorities of the thread so that it can perform background work without
/// significantly affecting activity in the foreground.This value can be specified only if hThread is a handle to the current thread. The function fails
/// if the thread is already in background processing mode.Windows Server 2003: This value is not supported.
/// End background processing mode. The system restores the resource scheduling priorities of the thread as they were before the thread entered
/// background processing mode.This value can be specified only if hThread is a handle to the current thread. The function fails if the thread is not in
/// background processing mode.Windows Server 2003: This value is not supported.
/// </term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_ABOVE_NORMAL1</term>
/// <term>Priority 1 point above the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_BELOW_NORMAL-1</term>
/// <term>Priority 1 point below the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_HIGHEST2</term>
/// <term>Priority 2 points above the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_IDLE-15</term>
/// <term>
/// Base priority of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS
/// processes, and a base priority of 16 for REALTIME_PRIORITY_CLASS processes.
/// </term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_LOWEST-2</term>
/// <term>Priority 2 points below the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_NORMAL0</term>
/// <term>Normal priority for the priority class.</term>
/// </item>
/// <item>
/// <term>THREAD_PRIORITY_TIME_CRITICAL15</term>
/// <term>
/// Base priority of 15 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS
/// processes, and a base priority of 31 for REALTIME_PRIORITY_CLASS processes.
/// </term>
/// </item>
/// </list>
/// </para>
/// <para>
/// If the thread has the <c>REALTIME_PRIORITY_CLASS</c> base class, this parameter can also be -7, -6, -5, -4, -3, 3, 4, 5, or 6. For more information,
/// see Scheduling Priorities.
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// <c>Windows Phone 8.1:</c> Windows Phone Store apps may call this function but it has no effect. The function will return a nonzero value indicating success.
/// Sets the minimum size of the stack associated with the calling thread or fiber that will be available during any stack overflow exceptions. This is
/// useful for handling stack overflow exceptions; the application can safely use the specified number of bytes during exception handling.
/// </summary>
/// <param name="StackSizeInBytes">
/// <para>The size of the stack, in bytes. On return, this value is set to the size of the previous stack, in bytes.</para>
/// <para>If this parameter is 0 (zero), the function succeeds and the parameter contains the size of the current stack.</para>
/// <para>
/// If the specified size is less than the current size, the function succeeds but ignores this request. Therefore, you cannot use this function to
/// reduce the size of the stack.
/// </para>
/// <para>This value cannot be larger than the reserved stack size.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is 0 (zero). To get extended error information, call <c>GetLastError</c>.</para>
/// Causes the calling thread to yield execution to another thread that is ready to run on the current processor. The operating system selects the next
/// thread to be executed.
/// </summary>
/// <returns>
/// <para>If calling the <c>SwitchToThread</c> function causes the operating system to switch execution to another thread, the return value is nonzero.</para>
/// <para>
/// If there are no other threads ready to execute, the operating system does not switch execution to another thread, and the return value is zero.
/// Allocates a thread local storage (TLS) index. Any thread of the process can subsequently use this index to store and retrieve values that are local
/// to the thread, because each thread receives its own slot for the index.
/// </summary>
/// <returns>
/// <para>If the function succeeds, the return value is a TLS index. The slots for the index are initialized to zero.</para>
/// <para>If the function fails, the return value is <c>TLS_OUT_OF_INDEXES</c>. To get extended error information, call <c>GetLastError</c>.</para>
/// Retrieves the value in the calling thread's thread local storage (TLS) slot for the specified TLS index. Each thread of a process has its own slot
/// for each TLS index.
/// </summary>
/// <param name="dwTlsIndex">The TLS index that was allocated by the <c>TlsAlloc</c> function.</param>
/// <returns>
/// <para>
/// If the function succeeds, the return value is the value stored in the calling thread's TLS slot associated with the specified index. If dwTlsIndex is
/// a valid index allocated by a successful call to <c>TlsAlloc</c>, this function always succeeds.
/// </para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// <para>
/// The data stored in a TLS slot can have a value of 0 because it still has its initial value or because the thread called the <c>TlsSetValue</c>
/// function with 0. Therefore, if the return value is 0, you must check whether <c>GetLastError</c> returns <c>ERROR_SUCCESS</c> before determining that
/// the function has failed. If <c>GetLastError</c> returns <c>ERROR_SUCCESS</c>, then the function has succeeded and the data stored in the TLS slot is
/// 0. Otherwise, the function has failed.
/// </para>
/// <para>
/// Functions that return indications of failure call <c>SetLastError</c> when they fail. They generally do not call <c>SetLastError</c> when they
/// succeed. The <c>TlsGetValue</c> function is an exception to this general rule. The <c>TlsGetValue</c> function calls <c>SetLastError</c> to clear a
/// thread's last error when it succeeds. That allows checking for the error-free retrieval of zero values.
/// The lpValue parameter is a pointer to a GROUP_AFFINITY structure that specifies the processor group affinity for the new thread.Windows Server 2008
/// and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
/// The lpValue parameter is a pointer to a list of handles to be inherited by the child process.These handles must be created as inheritable handles and
/// must not include pseudo handles such as those returned by the GetCurrentProcess or GetCurrentThread function.
/// The lpValue parameter is a pointer to a DWORD or DWORD64 that specifies the exploit mitigation policy for the child process. Starting in Windows 10,
/// version 1703, this parameter can also be a pointer to a two-element DWORD64 array.The specified policy overrides the policies set for the application
/// and the system and cannot be changed after the child process starts running. Windows Server 2008 and Windows Vista: This value is not supported until
/// Windows 7 and Windows Server 2008 R2.The DWORD or DWORD64 pointed to by lpValue can be one or more of the values listed in the remarks.
/// The lpValue parameter is a pointer to the node number of the preferred NUMA node for the new process.Windows Server 2008 and Windows Vista: This
/// value is not supported until Windows 7 and Windows Server 2008 R2.
/// </term>
/// </item>
/// <item>
/// <term>PROC_THREAD_ATTRIBUTE_UMS_THREAD</term>
/// <term>
/// The lpValue parameter is a pointer to a UMS_CREATE_THREAD_ATTRIBUTES structure that specifies a user-mode scheduling (UMS) thread context and a UMS
/// completion list to associate with the thread. After the UMS thread is created, the system queues it to the specified completion list. The UMS thread
/// runs only when an application&#39;s UMS scheduler retrieves the UMS thread from the completion list and selects it to run. For more information,
/// see User-Mode Scheduling.Windows Server 2008 and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
/// The lpValue parameter is a pointer to a SECURITY_CAPABILITIES structure that defines the security capabilities of an app container. If this attribute
/// is set the new process will be created as an AppContainer process.Windows 7, Windows Server 2008 R2, Windows Server 2008 and Windows Vista: This
/// value is not supported until Windows 8 and Windows Server 2012.
/// The lpValue parameter is a pointer to a DWORD value of PROTECTION_LEVEL_SAME. This specifies the protection level of the child process to be the same
/// as the protection level of its parent process.
/// The lpValue parameter is a pointer to a DWORD or DWORD64 value that specifies the child process policy. THe policy specifies whether to allow a child
/// process to be created.For information on the possible values for the DWORD or DWORD64 to which lpValue points, see Remarks.
/// This attribute is relevant only to win32 applications that have been converted to UWP packages by using the Desktop Bridge. The lpValue parameter is
/// a pointer to a DWORD value that specifies the desktop app policy. The policy specifies whether descendant processes should continue to run in the
/// desktop environment.For information about the possible values for the DWORD to which lpValue points, see Remarks.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpValue">
/// A pointer to the attribute value. This value should persist until the attribute is destroyed using the <c>DeleteProcThreadAttributeList</c> function.
/// </param>
/// <param name="cbSize">The size of the attribute value specified by the lpValue parameter.</param>
/// <param name="lpPreviousValue">This parameter is reserved and must be NULL.</param>
/// <param name="lpReturnSize">This parameter is reserved and must be NULL.</param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// Contains process mitigation policy settings for Control Flow Guard (CFG). The <c>GetProcessMitigationPolicy</c> and <c>SetProcessMitigationPolicy</c>
/// <term>Indicates that the feedback cursor is forced off while the process is starting. The Normal Select cursor is displayed.</term>
/// </item>
/// <item>
/// <term>STARTF_PREVENTPINNING0x00002000</term>
/// <term>Indicates that any windows created by the process cannot be pinned on the taskbar.This flag must be combined with STARTF_TITLEISAPPID.</term>
/// </item>
/// <item>
/// <term>STARTF_RUNFULLSCREEN0x00000020</term>
/// <term>
/// Indicates that the process should be run in full-screen mode, rather than in windowed mode. This flag is only valid for console applications
/// running on an x86 computer.
/// </term>
/// </item>
/// <item>
/// <term>STARTF_TITLEISAPPID0x00001000</term>
/// <term>
/// The lpTitle member contains an AppUserModelID. This identifier controls how the taskbar and Start menu present the application, and enables it to
/// be associated with the correct shortcuts and Jump Lists. Generally, applications will use the SetCurrentProcessExplicitAppUserModelID and
/// GetCurrentProcessExplicitAppUserModelID functions instead of setting this flag. For more information, see Application User Model IDs.If
/// STARTF_PREVENTPINNING is used, application windows cannot be pinned on the taskbar. The use of any AppUserModelID-related window properties by
/// the application overrides this setting for that window only.This flag cannot be used with STARTF_TITLEISLINKNAME.
/// </term>
/// </item>
/// <item>
/// <term>STARTF_TITLEISLINKNAME0x00000800</term>
/// <term>
/// The lpTitle member contains the path of the shortcut file (.lnk) that the user invoked to start this process. This is typically set by the shell
/// when a .lnk file pointing to the launched application is invoked. Most applications will not need to set this value.This flag cannot be used with STARTF_TITLEISAPPID.
/// </term>
/// </item>
/// <item>
/// <term>STARTF_UNTRUSTEDSOURCE0x00008000</term>
/// <term>The command line came from an untrusted source. For more information, see Remarks.</term>
/// </item>
/// <item>
/// <term/>
/// <term/>
/// </item>
/// <item>
/// <term>STARTF_USECOUNTCHARS0x00000008</term>
/// <term>The dwXCountChars and dwYCountChars members contain additional information.</term>
/// <term>The dwFillAttribute member contains additional information.</term>
/// </item>
/// <item>
/// <term>STARTF_USEHOTKEY0x00000200</term>
/// <term>The hStdInput member contains additional information. This flag cannot be used with STARTF_USESTDHANDLES.</term>
/// </item>
/// <item>
/// <term>STARTF_USEPOSITION0x00000004</term>
/// <term>The dwX and dwY members contain additional information.</term>
/// </item>
/// <item>
/// <term>STARTF_USESHOWWINDOW0x00000001</term>
/// <term>The wShowWindow member contains additional information.</term>
/// </item>
/// <item>
/// <term>STARTF_USESIZE0x00000002</term>
/// <term>The dwXSize and dwYSize members contain additional information.</term>
/// </item>
/// <item>
/// <term>STARTF_USESTDHANDLES0x00000100</term>
/// <term>
/// The hStdInput, hStdOutput, and hStdError members contain additional information. If this flag is specified when calling one of the process
/// creation functions, the handles must be inheritable and the function&#39;s bInheritHandles parameter must be set to TRUE. For more
/// information, see Handle Inheritance.If this flag is specified when calling the GetStartupInfo function, these members are either the handle value
/// specified during process creation or INVALID_HANDLE_VALUE.Handles must be closed with CloseHandle when they are no longer needed.This flag cannot
/// be used with STARTF_USEHOTKEY.
/// </term>
/// </item>
/// </list>
/// </para>
/// </summary>
publicSTARTFdwFlags;
/// <summary>
/// <para>
/// If <c>dwFlags</c> specifies STARTF_USESHOWWINDOW, this member can be any of the values that can be specified in the nCmdShow parameter for the
/// <c>ShowWindow</c> function, except for SW_SHOWDEFAULT. Otherwise, this member is ignored.
/// </para>
/// <para>
/// For GUI processes, the first time <c>ShowWindow</c> is called, its nCmdShow parameter is ignored <c>wShowWindow</c> specifies the default value.
/// In subsequent calls to <c>ShowWindow</c>, the <c>wShowWindow</c> member is used if the nCmdShow parameter of <c>ShowWindow</c> is set to SW_SHOWDEFAULT.
/// </para>
/// </summary>
publicushortwShowWindow;
/// <summary>Reserved for use by the C Run-time; must be zero.</summary>
publicushortcbReserved2;
/// <summary>Reserved for use by the C Run-time; must be NULL.</summary>
publicIntPtrlpReserved2;
/// <summary>
/// <para>
/// If <c>dwFlags</c> specifies STARTF_USESTDHANDLES, this member is the standard input handle for the process. If STARTF_USESTDHANDLES is not
/// specified, the default for standard input is the keyboard buffer.
/// </para>
/// <para>
/// If <c>dwFlags</c> specifies STARTF_USEHOTKEY, this member specifies a hotkey value that is sent as the wParam parameter of a WM_SETHOTKEY message
/// to the first eligible top-level window created by the application that owns the process. If the window is created with the WS_POPUP window style,
/// it is not eligible unless the WS_EX_APPWINDOW extended window style is also set. For more information, see CreateWindowEx.
/// </para>
/// <para>Otherwise, this member is ignored.</para>
/// </summary>
publicIntPtrhStdInput;
/// <summary>
/// <para>
/// If <c>dwFlags</c> specifies STARTF_USESTDHANDLES, this member is the standard output handle for the process. Otherwise, this member is ignored
/// and the default for standard output is the console window's buffer.
/// </para>
/// <para>
/// If a process is launched from the taskbar or jump list, the system sets <c>hStdOutput</c> to a handle to the monitor that contains the taskbar or
/// jump list used to launch the process. For more information, see Remarks.
/// </para>
/// <para>
/// <c>Windows 7, Windows Server 2008 R2, Windows Vista, Windows Server 2008, Windows XP and Windows Server 2003:</c> This behavior was introduced in
/// Windows 8 and Windows Server 2012.
/// </para>
/// </summary>
publicIntPtrhStdOutput;
/// <summary>
/// If <c>dwFlags</c> specifies STARTF_USESTDHANDLES, this member is the standard error handle for the process. Otherwise, this member is ignored and
/// the default for standard error is the console window's buffer.
/// </summary>
publicIntPtrhStdError;
}
/// <summary>
/// <para>
/// This structure is returned by <c>GetSystemCpuSetInformation</c>. It is used to enumerate the CPU Sets on the system and determine their current state.
/// </para>
/// <para>
/// This is a variable-sized structure designed for future expansion. When iterating over this structure, use the size field to determine the offset to
/// the next structure.
/// </para>
/// </summary>
// typedef struct _SYSTEM_CPU_SET_INFORMATION { DWORD Size; CPU_SET_INFORMATION_TYPE Type; union { struct { DWORD Id; WORD Group; BYTE
/// <summary>This is the size, in bytes, of this information structure.</summary>
publicuintSize;
/// <summary>This is the type of information in the structure. Applications should skip any structures with unrecognized types.</summary>
publicCPU_SET_INFORMATION_TYPEType;
/// <summary>Union of structures that can be specified by Type.</summary>
publicSYSTEM_CPU_UNIONUnion;
/// <summary>Defines structures that can be specified by Type.</summary>
[StructLayout(LayoutKind.Explicit)]
publicstructSYSTEM_CPU_UNION
{
/// <summary>Value used when Type is CpuSetInformation.</summary>
[FieldOffset(0)]
publicSYSTEM_CPU_SET_INFORMATION1CpuSet;
}
}
/// <summary>Defines values used when Type is CpuSetInformation.</summary>
[StructLayout(LayoutKind.Sequential)]
publicstructSYSTEM_CPU_SET_INFORMATION1
{
/// <summary>
/// The ID of the specified CPU Set. This identifier can be used with SetProcessDefaultCpuSets or SetThreadSelectedCpuSets when specifying a list of
/// CPU Sets to affinitize to.
/// </summary>
publicuintId;
/// <summary>Specifies the Processor Group of the CPU Set. All other values in the CpuSet structure are relative to the processor group.</summary>
publicushortGroup;
/// <summary>
/// Specifies the group-relative index of the home processor of the CPU Set. Unless the CPU Set is parked for thermal or power management reasons or
/// assigned for exclusive use to another application, threads will run on the home processor of one of their CPU Sets. The Group and
/// LogicalProcessorIndex fields are the same as the ones found in the PROCESSOR_NUMBER structure and they correspond to the Group field and Mask
/// field of the GROUP_AFFINITY structure.
/// </summary>
publicbyteLogicalProcessorIndex;
/// <summary>
/// A group-relative value indicating which "Core" has the home processor of the CPU Set. This number is the same for all CPU Sets in the same group
/// that share significant execution resources with each other, such as different hardware threads on a single core that supports simultaneous multi-threading.
/// </summary>
publicbyteCoreIndex;
/// <summary>
/// A group-relative value indicating which CPU Sets share at least one level of cache with each other. This value is the same for all CPU Sets in a
/// group that are on processors that share cache with each other.
/// </summary>
publicbyteLastLevelCacheIndex;
/// <summary>
/// A group-relative value indicating which NUMA node a CPU Set is on. All CPU Sets in a given group that are on the same NUMA node will have the
/// same value for this field.
/// </summary>
publicbyteNumaNodeIndex;
/// <summary>
/// A value indicating the intrinsic energy efficiency of a processor for systems that support heterogeneous processors (such as ARM big.LITTLE
/// systems). CPU Sets with higher numerical values of this field have home processors that are faster but less power-efficient than ones with lower values.
/// </summary>
publicbyteEfficiencyClass;
/// <summary>All flags</summary>
publicSYSTEM_CPU_SET_FLAGSAllFlags;
/// <summary>Reserved</summary>
privateuintReserved;
/// <summary>Specifies a tag used by Core Allocation to communicate a given allocated CPU Set between threads in different components.</summary>
publiculongAllocationTag;
}
/// <summary>Specifies the throttling policies and how to apply them to a target thread when that thread is subject to power management.</summary>