"verTex" <Be******************@googlemail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
| Well, I'm having a problem right now. Just opening a file doesn't throw
| any exceptions! And I can open .txt files with various programs at the
| same time. Even if I OpenWrite an already opened file, it seems to
| work. When does a function fail if the file is already opened ? (or
| which)
| thanks!
|
And who's the other party? I mean what program has the file open and in what
mode? Also, bear in mind that some programs don't keep the files open while
they run, so you might be lulled into believe that the file is open while
it's not.
Anyway, all depends on "sharing mode", if:
a program (P1) has a file open for exclusive use, any subsequent attempt to
open the file will throw an exception.
If P1 has a file open with shared read access, any subsequent attempt to
open the file in read mode will succeed, while read/write mode will throw.
If P1 has a file open with read/write shared access, other programs will be
allowed to open the file in read and read/write mode.
Willy.