On 3/10/07, Nuno Lucas <[EMAIL PROTECTED]> wrote:
On 3/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> They are, at least on unix.  On unix, both files are opened with
> the O_EXCL flag.  How do I do the same thing for windows?

The code does that already. You just pass 0 on the share parameter and
no one can open (or delete) the file until closed. The only difference
to unix is the fact you can't delete a file while open (unless if you
pass the FILE_SHARE_DELETE, which isn't supported by Win9x).

My limited Unix file semantics knowledge got me in error. O_EXCL is
not (as the name seems to imply) used to open a file in exclusive
mode. It only works at creation time to error out if it was already
created (and, from the man page, seems to be broken on NFS
filesystems).

But I believe I got the windows case right, so please just ignore my
unix comparation part.

Regards,
~Nuno Lucas

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to