RE: [GD-Windows] retrieving the cluster size on xp
Brought to you by:
vexxed72
From: tweety <mi...@sy...> - 2004-03-13 21:55:28
|
I specified in the subject that I'm interested in finding out the cluster size (it's not a hint, but not partitionmagic, I'm just trying to find out the waste of space on my drive) on *xp*, not 9x/me. And I'd really, REALLY, REEEALY preffer not to go to the ddk... ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Simon O'Connor Sent: March 13, 2004 4:42 PM To: gam...@li... Subject: RE: [GD-Windows] retrieving the cluster size on xp Hi Tweety, You can use GetDiskFreeSpace() to find the number of sectors per cluster and the number of bytes per sector so simply multiply them to find the size of a cluster. The docs for GetDiskFreeSpace() do mention that the returned sectors per cluster value can be inaccurate under Windows 9x/ME for drives with more than 64 sectors per cluster (the 80Gb drive in this machine only has 8 per cluster so it might be a fairly unusual case). This is probably only an issue for you if your application needs to use this for something more than a "hint" (e.g. if you're writing something like PartitionMagic etc). If you do need the totally accurate value, you could obtain the DDK and take a look at the Win9x/Me specific FS_GetDiskInfo() function. Cheers, Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP ________________________________ From: gam...@li... [mailto:gam...@li...] On Behalf Of tweety Sent: 11 March 2004 23:39 To: gam...@li... Subject: [GD-Windows] retrieving the cluster size on xp Can someone please tell me how to get the cluster allocation size in windowsxp? of course, a portable way is the best, but just 2000/xp is fine. i searched the internet far and wide and all i could find is how to find it on fat16/12 partitions and on w95/98/xp. i looked at deviceiocontrol's functions, but none seems to return the cluster size or something that i could use... can you tell me? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |