What is best way to see if file is open by another user RRS feed

  • Question


    Hi All,


    I have a program where I open files, the problem is if the file that is being opened is on a network and is all ready opened by another user how can I prompt them that they can't open the file?


    Currently I have set it so that I create a TMP file when I open a file so that when another user try's to open the file it checks to see if the TMP file is there, if so then prompt user. but this way worrys me, as if the program crashed then the TMP files will not be deleted resulting in the user always being prompt saying the file is open.


    Any suggestions please.





    Monday, March 10, 2008 9:42 AM


All replies