[Wine] A problem with GetProcessMemoryInfo?

brown wineforum-user at winehq.org
Sun May 18 09:11:06 CDT 2008


I have made a simple program, but results from both windows and wine are quite different. Is this a bug in my program or in wine? Any advice is appreciated :)

/*
result under windows:
{
}
[successed: 1085440]{
}

result under wine(linux):
{
}
[successed: 0]{
*/

#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}");

}

void main()
{
	GetCurrentProcessMemory();
}







More information about the wine-users mailing list