Finding number of Cores of The Processor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Akash

    Finding number of Cores of The Processor

    Hi,
    I am using getProcessTimes API for calculating CPU Usage
    On a Multi-Core processor i have observed that the %CPU Usage that is
    multiple of the number of cores of the processor
    Is there any API in VC to find the number of Cores of a processor?
    (PS: Without using WMI ie)

    url:http://www.ureader.com/gp/1452-1.aspx
  • William DePalo [MVP VC++]

    #2
    Re: Finding number of Cores of The Processor

    "Akash" <a@a.comwrote in message
    news:35e856e7ac 06438494cfdde3a 3578fcc@newspe. com...
    I am using getProcessTimes API for calculating CPU Usage
    On a Multi-Core processor i have observed that the %CPU Usage that is
    multiple of the number of cores of the processor
    Is there any API in VC to find the number of Cores of a processor?
    (PS: Without using WMI ie)
    Take a look at GetSystemInfo()



    to see if it provides what you need.

    Regards,
    Will


    Comment

    • lucas69

      #3
      Re: Finding number of Cores of The Processor


      Yes, there are some apis.
      ask on win32 api newsgroup to get them :
      news://nntp.aioe.org/comp.os.ms-wind...ogrammer.win32



      --
      lucas69
      ------------------------------------------------------------------------
      Posted via http://www.codecomments.com
      ------------------------------------------------------------------------

      Comment

      • Bob Altman

        #4
        Re: Finding number of Cores of The Processor

        The NUMBER_OF_PROCE SSORS environment variable tells you how many total
        processors your PC has (number of CPUs times number of cores per CPU times 2
        if hyperthreading is enabled)

        Bob

        Comment

        Working...