Code Comments
Programming Forum and web based access to our favorite programming groups.The information retrieved by a GetDiskFreeSpaceEX API call is stored as a ULARGE_INTEGER data type (64-bit integer). I believe that Visual C forms this data type through a union of two 32-bit integers. Is it possible to form a 64-bit integer in a similar manner in C5.5 EE? Is there a better method to get the correct amount of free disk space remaining for large drives? I was hoping that C6.0 would include a 64-bit integer as a simple data type but I didn't see it in the documentation. I was about to develop a .dll under VC to link in my application but thought there must be a cleaner and easier way to solve this problem. Thank you, Jeff Willias (Replace this text with a title that relates complete command over a meaningless repetitive task)
Post Follow-up to this messageNa newsima:Nqz3c.27736$Wc4.3770@newssvr24.news.prodigy.com, Jeffrey Willias <jeffreyw@sbcglobal.net> se trudio da natipka: > The information retrieved by a GetDiskFreeSpaceEX API call is stored > as a ULARGE_INTEGER data type (64-bit integer). Hi Jeffrey I'm using GetDiskFreeSpace API call instead of GetDiskFreeSpaceEx Call looks like: If GetDiskFreeSpace(Drive,SectorsPerCluster ,BytesPerSector,NumberOfFreeClust ers,TotalNumberOfClusters)<>0 MBFree=SectorsPerCluster*BytesPerSector* NumberOfFreeClusters/(1024^2) End So you do not need any 64 bit variables...
Post Follow-up to this messageDrazen, Thank you for the quick response. I had read that the GetDiskFreeSpace API call was not reliable for large drives and, therefore, did not attempt to use it. Your information supplies an easy solution for my problem and is greatly appreciated. "Drazen Karamatic" <drazen.karamatic@zg.htnet.hr> wrote in message news:pGB3c.6167$%x4.779664@news.siol.net... > > I'm using GetDiskFreeSpace API call instead of GetDiskFreeSpaceEx > Call looks like: > > If > GetDiskFreeSpace(Drive,SectorsPerCluster ,BytesPerSector,NumberOfFreeClust > ers,TotalNumberOfClusters)<>0 > > MBFree=SectorsPerCluster*BytesPerSector* NumberOfFreeClusters/(1024^2) > End > > > So you do not need any 64 bit variables... > >
Post Follow-up to this messageNa newsima:doE3c.8713$VP5.4309@newssvr23.news.prodigy.com, Jeffrey Willias <jeffreyw@sbcglobal.net> se trudio da natipka: > Drazen, > > Thank you for the quick response. I had read that the > GetDiskFreeSpace API call was not reliable for large drives and, > therefore, did not attempt to use it. Your information supplies an > easy solution for my problem and is greatly appreciated. GetDiskFreeSpace is not reliable under W95 and drives larger than 2GB...
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.