I want to lock an existing file to prevent usage (read and write) from another process. That is, any subsequent attempt to open the file by this process or any other process should fail with an 'access denied' error.
The CreateFile WINAPI function has a dwShareMode
parameter which does exactly that, I'm looking for similar functionality while still being able to use QFile
.