NdisSystemActiveProcessorCount 函式 (ndis.h)
NdisSystemActiveProcessorCount 函式會傳回本機計算機中目前作用中的處理器數目。
語法
ULONG NdisSystemActiveProcessorCount(
PKAFFINITY ActiveProcessors
);
參數
ActiveProcessors
KAFFINITY型別變數的指標,該變數會接收代表目前使用中處理器集的位圖。 在熱新增環境中,此位圖可以在運行時間期間變更。
傳回值
NdisSystemActiveProcessorCount 會傳回本機計算機中目前作用中的處理器數目。
言論
NDIS 驅動程式可能會在初始化期間呼叫 NdisSystemActiveProcessorCount 函式,然後再配置資源。
NdisSystemActiveProcessorCount 類似於 KeQueryActiveProcessorCount 函式。
注意 NDIS 驅動程式不應該使用 NdisSystemProcessorCount 來擷取目前使用中處理器的數目,
NoteNdisSystemActiveProcessorCount 可能不會將處理器對應至傳回的 [**KAFFINITY**](/windows-hardware/drivers/kernel/interrupt-affinity-and-priority#about-kaffinity) 值的位。 和 NdisSystemActiveProcessorCount 在每次呼叫時可能不會傳回相同的位陣圖。
Windows Server 2008 企業版作系統和 Windows Server 2008 Datacenter作系統支援 動態硬體分割。 在動態硬體分割中,Windows Server 2008 支援運行時間 CPU 的熱新增作業。 在熱新增 CPU 環境中,處理器數目在運行時間期間可能不會維持不變。
要求
要求 | 價值 |
---|---|
最低支援的用戶端 | NDIS 6.1 支援。 針對 NDIS 6.20 和更新版本,請改用 NdisGroupActiveProcessorCount。 |
目標平臺 | 普遍 |
標頭 | ndis.h (包括 Ndis.h) |
連結庫 | Ndis.lib |
IRQL | 任何層級 |