Win32 code example - punch holes into file to deallocate blocks and make it a "sparse file"?

57 Views Asked by At

Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...) to punch a hole into a file, i.e. deallocate the blocks given and make the file a "sparse file".

Does anyone have a Win32 ISO C code example (Microsoft docs do not have EXAMPLES!) to do the same with the Win32 API, e.g. code which demonstrates how to punch two holes into a file, say, at positions 34000...51000 and 71000...91000?

0

There are 0 best solutions below