GetProcessDefaultCpuSets function

Retrieves the list of CPU Sets in the process default set that was set by SetProcessDefaultCpuSets. If no default CPU Sets are set for a given process, then the RequiredIdCount is set to 0 and the function succeeds.

Syntax

BOOL WINAPI GetProcessDefaultCpuSets(
  _In_      HANDLE Process,
  _Out_opt_ PULONG CpuSetIds,
  _In_      ULONG  CpuSetIdCount,
  _Out_     PULONG RequiredIdCount
);

Parameters

Process [in]

Specifies a process handle for the process to query. This handle must have the PROCESS_QUERY_LIMITED_INFORMATION access right. The value returned by GetCurrentProcess can also be specified here.

CpuSetIds [out, optional]

Specifies an optional buffer to retrieve the list of CPU Set identifiers.

CpuSetIdCount [in]

Specifies the capacity of the buffer specified in CpuSetIds. If the buffer is NULL, this must be 0.

RequiredIdCount [out]

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.

Return value

This API returns TRUE on success. If the buffer is not large enough the API returns FALSE, and the GetLastError value is ERROR_INSUFFICIENT_BUFFER. This API cannot fail when passed valid parameters and the return buffer is large enough.

Requirements

Minimum supported client
Windows 10 [desktop apps | UWP apps]
Minimum supported server
Windows Server 2016 [desktop apps | UWP apps]
Header
Processthreadapi.h
Library
Windows.h
DLL
Kernel32.dll