JackInMadrid
July 14th, 2006, 10:58 AM
hey
I'm getting the memory usage information for each process on a machine using psapi command 'GetProcessMemoryInfo'
This is my code:
_PROCESS_MEMORY_COUNTERS pmc;
GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc));
When running this on Windows 2003 Server it runs no problem, but with Windows 2000 Server it fails with an error code 24 ERROR_BAD_LENGTH.
But it says on the MSDN site that _PROCESS_MEMORY_COUNTERS is supported by Windows 2000 server.
Does anyone know why this is happening, or if it's possible to get this information another way? I'm not using Visual C++.
Any help would be appreciated
Jack
I'm getting the memory usage information for each process on a machine using psapi command 'GetProcessMemoryInfo'
This is my code:
_PROCESS_MEMORY_COUNTERS pmc;
GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc));
When running this on Windows 2003 Server it runs no problem, but with Windows 2000 Server it fails with an error code 24 ERROR_BAD_LENGTH.
But it says on the MSDN site that _PROCESS_MEMORY_COUNTERS is supported by Windows 2000 server.
Does anyone know why this is happening, or if it's possible to get this information another way? I'm not using Visual C++.
Any help would be appreciated
Jack