On 3/2/06, Paul G <[EMAIL PROTECTED]> wrote: > From: "Nuno Lucas" <[EMAIL PROTECTED]> > > The only problem is that it can be a race condition between the > > closing of the handle and the actual delete command (because you can't > > delete an open file on win world). > > you lie! <g> if the file is opened with the delete sharemode set, it can be > 'deleted' while open. in this case, it will be *really* deleted when the > refcount drops to 0, iirc. besides, these hoops don't need to be jumped > through if you're the process that issued the original CreateFile(), again > iirc.
You're right, off course. When I wrote that I was only thinking on Windows CE, which don't implement the FILE_SHARE_DELETE mode (at least for CE <=4.2, not sure about the 5.0 version). But note that the flag only exists on NT, not on Win9x (which can be considered obsolete now, but was important enough to make me never use it before). Best regards, ~Nuno Lucas