GetProcessDefaultCpuSets function (processthreadsapi.h)
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 GetProcessDefaultCpuSets(
HANDLE Process,
PULONG CpuSetIds,
ULONG CpuSetIdCount,
PULONG RequiredIdCount
);
Parameters
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 GetCurrentProcess can also be specified here.
CpuSetIds
Specifies an optional buffer to retrieve the list of CPU Set identifiers.
CpuSetIdCount
Specifies the capacity of the buffer specified in CpuSetIds. If the buffer is NULL, this must be 0.
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.
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
Requirement | Value |
---|---|
Minimum supported client | Windows 10 |
Minimum supported server | Windows Server 2016 |
Header | processthreadsapi.h |
DLL | Kernel32.dll |