We help IT Professionals succeed at work.
Get Started

Using FileEncryptionStatus() but it fails.

356 Views
Last Modified: 2013-12-14
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
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE