RE: [Dev-C++] GetDiskFreeSpaceEx Question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Hammamur R. <HRa...@ho...> - 2003-03-22 19:58:46
|
Hi, thank you for your help! I have now used the QuadPart, I written a test program to see what values I get with using the variables with the QuadPart and without. All of my partition output the same size, but one outputs different, i.e. the uliFree is returning different values to uliFree.QuadPart. I think I know what the problem is. The partition outputting different values has got more then 4 gigs free, all the other partitions have got less then 2 gigs free. Could you please tell me how I can fix this, I tried to follow the Microsoft site, but got more confused. Thank You! -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Per Westermark Sent: 22 March 2003 11:38 To: Hammamur Rahman Cc: dev...@li... Subject: Re: [Dev-C++] GetDiskFreeSpaceEx Question You might use the uliFreeCaller.QuadPart value, which is a 64-bit integer. Or, if you know that the information is < 4GB, you have a 32-bit value in uliFreeCaller.LowPart. Note that since a HD normally is larger than 4 GB, you may not assume that you might send the information to a function that only accepts a 'normal integer value'. A little improvement would be to Rewrite your function to assume space in kB units, and then you call it with: MyFunction(unsigned(uliFreeCaller.QuadPart / 1024)); That would be safe up to 4TB disks. /Per W On Sat, 22 Mar 2003, Hammamur Rahman wrote: > > > Hi, I'm using the following function: > > GetDiskFreeSpaceEx(&szDrives[i], &uliFreeCaller, &uliTotal, &uliFree) > > > > The uliFreeCaller, uliTotal, uliFree are all of type ULARGE_INTEGER. Now I > need these values as normal integer so I could pass these values to another > function which only accepts normal integer values. How could I convert them > to normal integer, do I have to cast them. Please help. > > > > Thank You! > > > > > _________________________________________________________________ > Use MSN Messenger to send music and pics to your friends > http://messenger.msn.co.uk > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |