GetMaximumProcessorCount function (winbase.h)

Returns the maximum number of logical processors that a processor group or the system can have.

Syntax

DWORD GetMaximumProcessorCount(
  [in] WORD GroupNumber
);

Parameters

[in] GroupNumber

The processor group number. If this parameter is ALL_PROCESSOR_GROUPS, the function returns the maximum number of processors that the system can have.

Return value

If the function succeeds, the return value is the maximum number of processors that the specified group can have.

If the function fails, the return value is zero. To get extended error information, use GetLastError.

Remarks

To compile an application that uses this function, set _WIN32_WINNT >= 0x0601. For more information, see Using the Windows Headers.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll