Hi Doug,
On Tue, 04 Oct 2005 16:45:02 -0500, Douglas C. Schmidt wrote:
> Hi Folks,
>
> On UNIX you can remove a file that's been open()'d be another
> process and the OS will let you do this and will actually delete the
> file when the final handle is closed. Is there some way to do this on
> Windows, as well?
If all the processs which have an open handle on the file, had opened the
file by passing FILE_SHARE_DELETE to CreateFile(), then a new process can
open the file by passing FILE_FLAG_DELETE_ON_CLOSE to CreateFile() when it
opens the same file, and Windows will delete the file all the open handles
are closed.
-kitty.
--
Krishnakumar B <kitty at dre dot vanderbilt dot edu>
Institute for Software Integrated Systems, Dept. of EECS, Vanderbilt University