FindFirstFile and SE_BACKUP_NAME

25 May 2007 17:04

If you want to read a file and bypass security (e.g., if you’re writing a backup program), it’s not enough to simply enable the SE_BACKUP_NAME privilege, you have to also pass FILE_FLAG_BACKUP_SEMANTICS to CreateFile.

Fortunately, you don’t have to do this for FindFirstFile. Enabling the privilege is enough.