A file offset using IOCTL_VOLUME_LOGICAL_to_PHYSICAL

gsegria 1 Reputation point
2022-06-07T12:11:13.703+00:00

I am investigating how to find out physical address from start offset to end offset.

For example:

  1. There is a 70GB storage. (F:)
  2. There are four 17GB files. 17GB-1.bin, 17GB-2.bin, 17GB-3.bin, 17GB-4.bin
  3. copy 17GB-1.bin, 17GB-2.bin, 17GB-3.bin and 17GB-4.bin to 70GB storage.

I found out sector address of file with IOCTL_VOLUME_LOGICAL_TO_PHYSICAL.

start offset is physicalOffsets.PhysicalOffset [0].Offset.
end offset is physicalOffsets.PhysicalOffset [0].Offset + filesize.

F:\17GB-1.bin start offset and end offset are correct.
F:\17GB-2.bin start offset and end offset are correct.
F:\17GB-3.bin start offset and end offset are correct.
F:\17GB-4.bin start offset is correct, but end offset is wrong.

Any way to find a large file offset on start address and end offset?

Developer technologies C++
Developer technologies Small BASIC
{count} votes

1 answer

Sort by: Most helpful
  1. WhTurner 1,611 Reputation points
    2022-06-08T11:19:19.297+00:00

    The tag "small-basic" is for Technical questions about Microsoft Small Basic, the only text-based language and IDE built for students to learn to code

    Please remove the tag "small-basic" as your question in not about Small Basic

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.