UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:processthreadsapi.SetProcessAffinityUpdateMode |
SetProcessAffinityUpdateMode function (processthreadsapi.h) |
Sets the affinity update mode of the specified process. |
|
base\setprocessaffinityupdatemode.htm |
processthreadsapi |
46e8f7d2-89b9-42cb-9171-d5ae2ec870da |
12/05/2018 |
PROCESS_AFFINITY_ENABLE_AUTO_UPDATE, SetProcessAffinityUpdateMode, SetProcessAffinityUpdateMode function, base.setprocessaffinityupdatemode, processthreadsapi/SetProcessAffinityUpdateMode, winbase/SetProcessAffinityUpdateMode |
processthreadsapi.h |
Windows.h on Windows 7, Windows Server 2008 Windows Server 2008 R2 |
Windows |
Windows Vista with SP1 [desktop apps only] |
Windows Server 2008 [desktop apps only] |
Kernel32.lib |
Kernel32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Sets the affinity update mode of the specified process.
A handle to the process. This handle must be returned by the GetCurrentProcess function.
The affinity update mode. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Disables dynamic update of the process affinity by the system. |
|
Enables dynamic update of the process affinity by the system. |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The system can adjust process affinity under various conditions, such as when a processor is added dynamically. By default, dynamic updates to the process affinity are disabled for each process.
Processes should use this function to indicate whether they can handle dynamic adjustment of process affinity by the system. After a process enables affinity update mode, it can call this function to disable it. However, a process cannot enable affinity update mode after it has used this function to disable it.
Child processes do not inherit the affinity update mode of the parent process. The affinity update mode must be explicitly set for each child process.
To compile an application that calls this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers.