SetProcessDefaultCpuSets function (processthreadsapi.h)

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 SetThreadSelectedCpuSets, will inherit the sets specified by SetProcessDefaultCpuSets automatically.


BOOL SetProcessDefaultCpuSets(
  HANDLE      Process,
  const ULONG *CpuSetIds,
  ULONG       CpuSetIdCount



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 GetCurrentProcess can also be specified here.


Specifies the list of CPU Set IDs to set as the process default CPU set. If this is NULL, the SetProcessDefaultCpuSets clears out any assignment.


Specifies the number of IDs in the list passed in the CpuSetIds argument. If that value is NULL, this should be 0.

Return value

This function cannot fail when passed valid parameters


Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Header processthreadsapi.h
DLL kernel32.dll