Try this:
#include "windows.h"
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
ULARGE_INTEGER uliFree;
ULARGE_INTEGER uliTotal;
MEMORYSTATUS msMemory;
RETAILMSG(TRUE, (_T("------ ADS System Resource Report ------\r\n")));
GetDiskFreeSpaceEx(_T("\\FlashFX Disk"), &uliFree, &uliTotal, NULL);
RETAILMSG(TRUE, (_T("FlashFX Disk:\r\n")));
RETAILMSG(TRUE, (_T(" Size: %i bytes\r\n"), uliTotal));
RETAILMSG(TRUE, (_T(" Available: %i bytes\r\n\n"), uliFree));
msMemory.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&msMemory);
RETAILMSG(TRUE, (_T("RAM:\r\n")));
RETAILMSG(TRUE, (_T(" Total Physical: %i bytes\r\n"), msMemory.dwTotalPhys));
RETAILMSG(TRUE, (_T(" Avail Physical: %i bytes\r\n"), msMemory.dwAvailPhys));
RETAILMSG(TRUE, (_T(" Total Virtual: %i bytes\r\n"), msMemory.dwTotalVirtual));
RETAILMSG(TRUE, (_T(" Avail Virtual: %i bytes\r\n"), msMemory.dwAvailVirtual));
RETAILMSG(TRUE, (_T(" Current load: %i%%\r\n"), msMemory.dwMemoryLoad));
RETAILMSG(TRUE, (_T("----------------------------------------\r\n\n")));
return 0;
}
-----------------
Chris Tacke, eMVP
Applied Data Support