troubleshooting Question

Using FileEncryptionStatus() but it fails.

Avatar of mjgardne
mjgardne asked on
Editors IDEsSystem ProgrammingVisual C++.NET
3 Comments1 Solution360 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
mjgardne

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros