Announcement

Collapse
No announcement yet.

HwInfo.dll inaccurate API used

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HwInfo.dll inaccurate API used

    The author of this plugin should consider using the following replacement API (GlobalMemoryStatusEx instead of GlobalMemoryStatus) that is more accurate on larger installed memory. MSDN points this out and I have found it to be very true.

    void CHardwareInfo::GetTotalSystemMemory( int &sysMem )
    {
    MEMORYSTATUSEX statex;
    statex.dwLength = sizeof (statex);
    GlobalMemoryStatusEx (&statex);
    sysMem = (int)( ceil( statex.ullTotalPhys / 1048576.f ) );
    }
Working...
X
😀
🥰
🤢
😎
😡
👍
👎