Tag
Explains that FILE_FLAG_DELETE_ON_CLOSE is irreversible, but you can achieve conditional deletion by using SetFileInformationByHandle to toggle the delete disposition.