sjuser00-8477 avatar image
0 Votes"
sjuser00-8477 asked JunjieZhu-MSFT commented

DeviceIoControl API failure in latest windows 10 OS while querying a bitlocked USB with control code: IOCTL_DISK_IS_WRITABLE

I have an MFC application which was created using windows SDK version 10.0.17763.0. Basically the application was deployed in Windows 10 1909 build(LTSC 2019). I have used DeviceIoControl API to check whether the drive is writable. In 1909 windows version the API was successful, but when I use the application in latest windows version(21H1/21H2), the API fails and return GetLastError value: FVE_E_LOCKED_VOLUME, which has the information "This drive is locked by BitLocker Drive Encryption. You must unlock this volume from Control Panel.".

I am not exactly looking for a solution to the API failure, but trying to find out from which windows 10 OS version this behavior has started. As I am using 10.0.17763.0 windows SDK version to build the application, and the same application is used in both old and latest windows version. Can you suggest an explanation for this, what happened to the behavior ?

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I did not reproduce your situation, in latest windows version(21H1/21H2).
Could you provide a code sample of how you are using the DeviceIoControl API?

0 Votes 0 ·

[1]: /answers/storage/attachments/198403-verifybitlockusbinsert.txt

@JunjieZhu-MSFT - I have attached the sample console application code that I have written to test above scenario.

0 Votes 0 ·

Is this a normal result?

0 Votes 0 ·
image.png (33.4 KiB)

Would you mind showing your test results?

0 Votes 0 ·
Show more comments

0 Answers