"Jesper, Denmark" <Je***********@discussions.microsoft.comschrieb im
Newsbeitrag news:77**********************************@microsof t.com...
Hi
In an app that I', writing, I would like to implement the similar to the
functionality in MS Word where Word detects wether a *.doc file has
already
been opened in another instance of Word. I guess I would set some file
attribute like read-only or something on the file - however, does anyone
know
of any other smart way to secure that a the same data file is only opened
in
one instance of a program at a time.
Thanks.
Jesper.
Hi Jesper,
this depends on the "opening" application how it opens
the file. It can e.g. open the file with different FileShare-Modes.
Take a look at this:
[File.Open Method (String, FileMode, FileAccess, FileShare)]
http://msdn2.microsoft.com/en-us/library/y973b725.aspx
[FileShare Enumeration]
http://msdn2.microsoft.com/en-us/lib...fileshare.aspx
This should be a good guide,...
Best regards
Kerem Gümrükcü