Deleting a file based on disk ID

前端 未结 4 1687
清歌不尽
清歌不尽 2021-02-19 09:09

As described here, using SetFileInformationByHandle with FILE_DISPOSITION_INFO allows one to set a file with an open handle to be deleted upon all handles being closed.

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 10:09

    Have you looked into FILE_FLAG_POSIX_SEMANTICS? It will allow you to open files that differ only in case using CreateFile.

    Edit: I guess I should have read your code first as I see you are using said flag.

提交回复
热议问题