If I open a file with a program and I write another program which wants to open the same file, is ther a property I can check to see if the file is already open by another program ?.
That depends on OS and what mode your'e opening it in.
If you open it with write-access and no share (NT+) the second program trying to open it will fail, getting error codes indicating that file is taken by other program.
Look in the help for "CreateFile(...)", there is a thourough description on OS and sharing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.