We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

GetProcessorCount Function

Returns the number of hardware threads on the underlying system.

_CRTIMP unsigned int GetProcessorCount();

The number of hardware threads.

unsupported_os is thrown if the operating system is not supported by the Concurrency Runtime. The earliest operating system supported is Windows XP with Service Pack 3.

Header: concrtrm.h

Namespace: Concurrency

Show: