Re: A problem with GetProcessMemoryInfo?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I modified code to:
#include <windows.h>
#include "psapi.h"
#include <stdio.h>
#include <stdlib.h>

#pragma comment ( lib, "psapi.lib" )

void GetCurrentProcessMemory ()
{
   PROCESS_MEMORY_COUNTERS pmc;

       printf("{\n}");

       bool ret=GetProcessMemoryInfo ( GetCurrentProcess() , &pmc, sizeof ( pmc
) );

       if (ret)
               printf("\n[successed: %d]", (int)pmc.WorkingSetSize);
       else
               printf("\n<failed>");

       printf("{\n}");

}

int main()
{
       GetCurrentProcessMemory();
       return 0;
}


I can compile it on my debian with: i586-mingw32msvc-gcc foo.cpp -lpsapi






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux