2

similar to this thread:

Detect BitLocker programmatically from c# without admin

I want to get the bitlocker status of a drive programmatically in Rust (without admin privileges). Is there a way, to check the bitlocker status without admin privileges, similar to the thread above? My goal is a function like:


use std::io;

// drive_letter could be something like "C"
fn is_bde_active(drive_letter: String) -> io::Result<bool> {
    [...]

}

I'm not very familiar with winapi or windows unfortunately. I have not found any IShellProperty in the winapi documentation.

Jason
  • 4,905
  • 1
  • 30
  • 38
ph0llux
  • 21
  • 2
  • I can't give an answer, but perhaps Microsoft's actively maintained [`windows-rs`](https://github.com/microsoft/windows-rs) might be of help here. There seems (?) to be something in there, such as [`SHGetPropertyStoreFromParsingName`](https://microsoft.github.io/windows-docs-rs/doc/bindings/windows/win32/windows_properties_system/fn.SHGetPropertyStoreFromParsingName.html) and [`BitLockerEnabled`](https://microsoft.github.io/windows-docs-rs/doc/bindings/windows/win32/windows_clustering/constant.BitLockerEnabled.html) that might be of help. There is a "Getting started" video in their repository. – Jason Mar 26 '21 at 13:35

0 Answers0