How to get the blocksize of a device
- Posted by Alan Oxley <fizzpop at axx?ss.co.z?> Aug 21, 2007
- 558 views
Hi! I want to write a program where I will copy a file, and skip bad blocks. Bad blocks as in hardware error, where windows just gets stuck. The base unit of storage on a disk/cd etc is a block. How can I find out what that blocksize is? Similar to Linux's inode size for ext2 and ext3 filesystems. On Windows NTFS the blocksize can be 512 to 8192 or more? Looking in the archive, the closest I found was a dll called getVolumeInformationA (used by William Heimbigner) which gives lots of details but I don't see blocksize. Any hints would be appreciated. Regards Alan