title: Retrieve physical address of file on disk
body: <p>Using the Windows API, I'm trying to write a program to read data from a disk. I managed to get access to the content of the drive using <a href="https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilew" rel="nofollow noreferrer">CreateFile</a> and I'm able to search through it. Let's say there are some files on that disk and I know their paths, but I'm actually interested in their physical location.</p>
  
  <p>My question is:
  Is it possible to retrieve the physical location or address of the files (or sector they're located in) and where are they stored on the drive without searching the whole drive? If so, what functions should I use? Using <a href="https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-setfilepointerex" rel="nofollow noreferrer">SetFilePointer</a> or <a href="https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfilew" rel="nofollow noreferrer">FindFirstFile</a> don't seem to solve the solution either.</p>