Hello,
I have a Win7 NTFS encrypted drive and am writing a program that will manipulate its files. I assumed that FileEncryptionStatus() will tell me whether or not a file is encrypted, but when I run my program against a file in the encrypted, not unlocked, drive, it fails with 0x80310000, "This drive is locked by BitLocker Drive Encryption. You must unlock this drive from Control Panel." My program needs to know whether a file is encrypted in order to use the proper method to copy it, so how can I determine its encryption status if the drive has not been unlocked, which is a requirement. Would GetFileInformationByHandle()'s attributes work correctly? I am running my application elevated, as an Administrator, with SEBackupName priv.
Thanks for your help,
Mike
Our community of experts have been thoroughly vetted for their expertise and industry experience.