#include <psapi.h>
and it builds fine.
But When I use:
PROCESS_MEMORY_COUNTERS info = { sizeof( info ) };
I get the error:
error C2065: PROCESS_MEMORY_COUNTERS undeclared identifier.
I have looked in the <psapi.h> file and it does not include a definition of
PROCESS_MEMORY_COUNTERS.
Whats wrong??
Thanks
My guess is you want process memory info? If so, see if GlobalMemoryStatus
does the trick for you.
--
Michael Salamone
Entrek Software, Inc.
www.entrek.com
"Cush" <Cu...@discussions.microsoft.com> wrote in message
news:53AECBA3-C219-42F5...@microsoft.com...
Do you have any sample code on how to use GlobalMemoryStatus? Thanks
MEMORYSTATUS ms;
ms.dwLength = sizeof(ms);
GlobalMemoryStatus(&ms);
// Process-specific info (for calling process)
ms.dwTotalVirtual;
ms.dwAvailVirtual;
// Process virtual memory usage (reserved + commit)
ms.dwTotalVirtual - dwAvailVirtual;
// System info
ms.dwMemoryLoad;
ms.dwTotalPhys;
ms.dwAvailPhys;
// System usage
ms.dwTotalPhys - ms.dwAvailPhys;
// Unused/unsupported
ms.dwTotalPageFile;
ms.dwAvailPageFile;
--
Michael Salamone
Entrek Software, Inc.
www.entrek.com
"Cush" <Cu...@discussions.microsoft.com> wrote in message
news:39EF3C8F-876B-411D...@microsoft.com...