I have a program which reads a file written by a software. But the software locks the file while writing to it (I cannot even copy the file!). How can I read the file while it is writing to it?
I'm using Windows 7 with NTFS filesystem, my program is written in C++.
The program which writes to the file should open it with read sharing enabled, otherwise other processes can't read from the file that is not closed yet:
See more details in MSDN CreateFile.