I'm trying to read a partition block by block using vc++. The hard drive has a block size of 512 bytes and the partition table tells me that the partition has a start offset of 128 and an end offset of 2048128. Since the partition is 1000MB in size, in my opinion the end offset should be 2048127 - whatever.
Now I open the volume with CreateFile (e.g. \?\Volume{a49ac1d4-723b-11ee-83be-386893b7f76d}) and read blocks of 512 bytes with ReadFile.
This works until block 2048120. After that, ReadFile signals EOF.
Can someone explain to me why this is so?
Is it correct that I cannot read the last 8 blocks of a partition (for whatever reason) or am I making a (thinking) mistake?