Title: [msvc] Open files?

I need to find out if a file is open by more than one user/app.

Is this possible?

I combed MSDN and the code sites and can't find anything, possibly because
I don't know what to search for.

Any ideas or pointers to how to do this would be appreciated.

What I am trying to do is trap the user error of trying to save a file with
the name of an open file (which obviously will fail) before I get so deep
into the "save the file to a temp name, delete the original file, and
rename the temp file" code that it becomes impossible to escape gracefully.

The problem is compounded by the fact that _I_ do have the file open.  But
I will close it before attempting to delete it.  But, if another user/app
also has the file open, it gets ugly real fast.

Phil Daley          < AutoDesk >
http://personal.monad.net/~p_daley

Reply via email to