I know, that there\'s the is_open()
function in C++, but I want one program to check if a file hasn\'t been opened by another application. Is there any way to d
Perhaps you could just try and get a full write lock? It'll fail if anyone else has it open for reading or writing.
fopen("myfile.txt", "r+")
If it's not cross platform and is Win32, then you can request even more fine-grained set of locks.
See here
and look at dwShareMode
, value of 0, as well as the other parameters.