I'm trying in Qt 5.5 to get "Physical Memory currently used by current process" with this tutorial: How to get system cpu/ram usage in c++ on Windows When I'm trying to add this function to my application I'm getting an error...
PROCESS_MEMORY_COUNTERS_EX pmc;
GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc)); // error C2664
SIZE_T physMemUsedByMe = pmc.WorkingSetSize;
Error:
C2664: 'BOOL K32GetProcessMemoryInfo(HANDLE,PPROCESS_MEMORY_COUNTERS,DWORD)' : cannot convert argument 2 from 'PROCESS_MEMORY_COUNTERS_EX *' to 'PPROCESS_MEMORY_COUNTERS'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Thank you for any help.