0 Membres et 1 Invité sur ce sujet
sasuke :Je suis pas sûr que l'ordinateur puisse avoir ces infos...Pour envoyer des infos sur une page Web : http://dracoblue.net/download/pwncurl-01/54/R@f :J'arrive pas à comprend comment 1586/2047 = 48%. :ninja
Written by CFJ0.Linking the executable with "/LARGEADDRESSAWARE" allows the program to support RAM above 2GB on 32bit systems.Code: [Sélectionner]#include <windows.h>#include <stdio.h>#pragma comment(linker,"/LARGEADDRESSAWARE")void GetTotalRAM(char* Buffer){ MEMORYSTATUS Status; ZeroMemory(&Status, sizeof(Status)); Status.dwLength = sizeof(Status); GlobalMemoryStatus(&Status); DWORD dwRAM = (DWORD)(Status.dwTotalPhys / (1024*1024)); wsprintf(Buffer, "%d MB", dwRAM);}void main(){ char TotalRAM[64] = ""; GetTotalRAM(TotalRAM); printf("Total Available RAM: %s\n", TotalRAM); ZeroMemory(TotalRAM, 64);}
#include <windows.h>#include <stdio.h>#pragma comment(linker,"/LARGEADDRESSAWARE")void GetTotalRAM(char* Buffer){ MEMORYSTATUS Status; ZeroMemory(&Status, sizeof(Status)); Status.dwLength = sizeof(Status); GlobalMemoryStatus(&Status); DWORD dwRAM = (DWORD)(Status.dwTotalPhys / (1024*1024)); wsprintf(Buffer, "%d MB", dwRAM);}void main(){ char TotalRAM[64] = ""; GetTotalRAM(TotalRAM); printf("Total Available RAM: %s\n", TotalRAM); ZeroMemory(TotalRAM, 64);}