Determining Available Disk Space

Memory is usually at a premium on a Windows CE–based device. Use the GetDiskFreeSpaceEx function to determine organizational data about a file system partition, including the number of bytes per sector, the number of sectors per cluster, the number of free clusters, and the total number of clusters. GetDiskFreeSpaceEx works on any file system, including installed file systems. You can also use the GetStoreInformation function to determine the current size of the object store, and how much free memory is available in the object store.