All Forums
 Microsoft Windows CE
 eVC Application Development
 Getting free space remaining on FlashFX Disk
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

RichMcGillicuddy

1 Posts

Posted - 04 Sep 2002 :  12:46:40  Show Profile  Email Poster
We are monitoring the amount of free space on our flash disk and running into a problem. Probably because we just are not using the right system call. We are trying to get the amount of freespace using

wstring strStoragePath;


bFail = GetDiskFreeSpaceEx(strStoragePath.c_str(), NULL, NULL, &uliFreeDiskSpace);
if(!bFail)
{
...
strStoragePath is set to '\\FlashFX Disk\\'

Is this the correct way to get the remaining disk space off the flash on a Bitsy Board?


Rich

ctacke

877 Posts

Posted - 04 Sep 2002 :  13:55:53  Show Profile  Email Poster
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
Go to Top of Page

jjmackay

24 Posts

Posted - 12 Aug 2005 :  15:47:59  Show Profile  Email Poster
Will the snippet given here to determin free space on the flash drive for the Bitsy Board work as is for the Graphics Client Plus board? I also am trying to monitor flash available.
Go to Top of Page

ctacke

877 Posts

Posted - 12 Aug 2005 :  16:25:36  Show Profile  Email Poster
Yes, this is general CE code, so it will work with any device.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000