I would like to write a program that reads all the unused clusters on an NTFS volumne. (I'm looking to recover data from a file that was accidentally truncated).
According to this page I can call SetFilePointer() and ReadFile() on the volume handle to go through each logical cluster on the volume. But how do I know which clusters are being used by files, and which are free?