Returns a block allocation map for a file
#include <nwadv.h> int GetFileHoleMap ( int handle, LONG startingPosition, LONG numberOfBlocks, BYTE *replyBitMapP, LONG *allocationUnitSizeP);
(IN) Specifies the pertinent file handle.
(IN) Specifies the 0-based byte offset into the file.
(IN) Specifies the number of file blocks required for a given file. This indirectly specifies the size in bytes of replyBitMapP. This can be computed by knowing the file size and the size of a block:
numberOfBlocks = (file-size) / (bytes-per-block) bytes-per-block = 8 x (sectors-per-block)
Use filelength and GetVolumeInformation to get the information to compute the number of blocks and round up, if necessary. The number specified must be in 4-byte increments: 4, 8, 12, etc.
(OUT) Points to a block of memory that should be considered as a bit-stream. If the bit is set, then the file block is allocated. If it is cleared, then the file block is not allocated.
(OUT) Points to the size of each block in bytes.
This function returns a value of 0 if successful. Otherwise, it returns an error code (nonzero value).
The startingPosition and numberOfBlocks specify which part of the file to return information about.