NdisSystemProcessorCount function (ndis.h)
The NdisSystemProcessorCount function determines whether the caller is running on a uniprocessor or multiprocessor computer.
Syntax
CCHAR NdisSystemProcessorCount();
Return value
NdisSystemProcessorCount returns the number of processors in the computer.
Remarks
An NDIS driver can call the NdisSystemProcessorCount function to retrieve the maximum number of processors in the local computer. To retrieve the number of currently active processors, the driver must call the NdisSystemActiveProcessorCount function.
NdisSystemProcessorCount is similar to the KeQueryMaximumProcessorCount function.
The value that NdisSystemProcessorCount returns does not change at runtime.
If your code uses an array of buffers, one buffer for each processor, you must decide whether to have a statically sized array based on NdisSystemProcessorCount or a dynamically sized array based on NdisSystemActiveProcessorCount.
To optimize your code based on the number of processors, you must use a resizable structure. In this case, use NdisSystemActiveProcessorCount.
If you are not optimizing and if the data structures that result from using the maximum processor count are relatively small, a resizable structure is not necessary. In this case, use NdisSystemProcessorCount to determine the size for a static array.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and 6.1. For NDIS 6.20 and later, use NdisGroupMaxProcessorCount. |
Target Platform | Universal |
Header | ndis.h (include Ndis.h) |
Library | Ndis.lib |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | Irql_Miscellaneous_Function(ndis) |
See also
DriverEntry of NDIS Protocol Drivers
NdisSystemActiveProcessorCount