locked
Get/read cpu information, e.g. cpu speed

    Question

  • In a metro style app can I read out the cpu speed?

    regards Johan

    Tuesday, November 29, 2011 1:51 PM

Answers

  • Hi Johan,

     

     

    Since WMI isn't available for Metro style apps, the best I can do to get that info is demonstrated in the sample DeviceEnumeration.

    Use this Interface Class GUID {97FADB10-4E33-40AE-359C-8BEF029DBDD0} which equates to GUID_DEVICE_PROCESSOR, the interface class for processors.

    Example:

    Hope that helps,

    -David Lamb

    • Marked as answer by Bob_Bao Wednesday, December 7, 2011 7:50 AM
    Thursday, December 1, 2011 1:59 AM
    Moderator

All replies

  • Hi Johan,

     

     

    Since WMI isn't available for Metro style apps, the best I can do to get that info is demonstrated in the sample DeviceEnumeration.

    Use this Interface Class GUID {97FADB10-4E33-40AE-359C-8BEF029DBDD0} which equates to GUID_DEVICE_PROCESSOR, the interface class for processors.

    Example:

    Hope that helps,

    -David Lamb

    • Marked as answer by Bob_Bao Wednesday, December 7, 2011 7:50 AM
    Thursday, December 1, 2011 1:59 AM
    Moderator
  • Hi David.

    Previously we used pdh.lib and related headers  for getting cpu usage. As you mentioned in this forum, Metro style does not provide any cpu reporter.I mean this is very important section for handling and managing game loop in DirectX APIs. Is there another solution for getting Cpu and checking Memory leaks for Metro style games?


    Best Regards. Pooya Eimandar.

    Wednesday, November 7, 2012 2:37 PM