Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a solution to determine the thread count via API
#4
(04-06-2024, 05:22 PM)SagaraS Wrote:
Code: (Select All)
DECLARE DYNAMIC LIBRARY "KERNEL32"
  FUNCTION GetMaximumProcessorCount% ALIAS "GetMaximumProcessorCount" (_
    Byval GroupNumber as integer)
END DECLARE

DIM CPUthreads AS INTEGER

PRINT GetMaximumProcessorCount(CPUthreads)

I think I have found a useful solution.
At least for my purposes for now.

But those are the CPU cores, or are they for the threads?

Because the threads refer to the CPU cores.

If an i7 980 now has 6 cores, it can have 12 threads.

It would be interesting how this can be determined via API.
So that you can display the max cores and max threads separately.
I think the following should help.

GetLogicalProcessorInformation function (sysinfoapi.h) - Win32 apps | Microsoft Learn
Reply


Messages In This Thread
RE: Looking for a solution to determine the thread count via API - by a740g - 04-06-2024, 05:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to add a Poll to a Thread Magdha 2 180 02-10-2026, 05:38 PM
Last Post: Magdha
  Maximum Number of Attachments per Thread Magdha 7 478 01-13-2026, 10:13 AM
Last Post: Magdha
  Command$(count%) - I can't get a value when using the optional argument "(count%)" Unatic 3 529 08-22-2025, 11:58 AM
Last Post: Unatic
  Instr to count occurrences PhilOfPerth 5 960 04-29-2025, 11:17 PM
Last Post: TempodiBasic
  Determine a value is INTEGER TerryRitchie 17 3,338 07-27-2024, 05:03 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)