Without doing dirty and nasty ways, I believe this to be not allowable from user mode, even with SE_BACKUP_NAME.
Things I consider dirty and nasty:
- Figuring out what process owns the handle and writing code to run in that process and close the handle.
- Reading/parsing the MFT/FAT table
- Using a Kernel Driver
Yes, there is a way, although it may not suit your needs; it isn’t dirty or nasty, but it’s heavy, i.e., it is not straightforward to code and it creates a disproportionate amount of system load if you’re just trying to read a single file.
However, if you need to do this, this is the only reasonable and safe solution I’m aware of: see the MSDN documentation on the Volume Shadow Copy Service.
Most backup software uses VSS nowadays.