Skip to content
Discussion options

You must be logged in to vote

It all depends on how applications call it. Either they call CreateFile with FILE_FLAG_DELETE_ON_CLOSE specified and then call CloseHandle, or they call DeleteFile which internally calls CreateFile, DeleteFile and CloseHandle.

And yes, CreateFile is used to both create new files and open existing files and directories.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ZhangHuan0407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants