Skip to content

Commit

Permalink
Add fltkernel.h to base headers
Browse files Browse the repository at this point in the history
This allows rust drivers to use fltmgr.
  • Loading branch information
wedsonaf committed Mar 7, 2025
1 parent 49935f3 commit 3973f1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/wdk-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ impl Config {
fn base_headers(&self) -> Vec<&'static str> {
match &self.driver_config {
DriverConfig::Wdm | DriverConfig::Kmdf(_) => {
vec!["ntifs.h", "ntddk.h", "ntstrsafe.h"]
vec!["ntifs.h", "ntddk.h", "ntstrsafe.h", "fltkernel.h"]
}
DriverConfig::Umdf(_) => {
vec!["windows.h"]
Expand Down Expand Up @@ -954,6 +954,7 @@ impl Config {
println!("cargo::rustc-link-lib=static=ntoskrnl");
println!("cargo::rustc-link-lib=static=hal");
println!("cargo::rustc-link-lib=static=wmilib");
println!("cargo::rustc-link-lib=static=fltmgr");

// Emit ARM64-specific libraries to link to derived from
// WindowsDriver.arm64.props
Expand Down Expand Up @@ -988,6 +989,7 @@ impl Config {
println!("cargo::rustc-link-lib=static=wmilib");
println!("cargo::rustc-link-lib=static=WdfLdr");
println!("cargo::rustc-link-lib=static=WdfDriverEntry");
println!("cargo::rustc-link-lib=static=fltmgr");

// Emit ARM64-specific libraries to link to derived from
// WindowsDriver.arm64.props
Expand Down Expand Up @@ -1461,6 +1463,7 @@ mod tests {
r#"#include "ntifs.h"
#include "ntddk.h"
#include "ntstrsafe.h"
#include "fltkernel.h"
"#,
);
}
Expand All @@ -1481,6 +1484,7 @@ mod tests {
r#"#include "ntifs.h"
#include "ntddk.h"
#include "ntstrsafe.h"
#include "fltkernel.h"
#include "wdf.h"
"#,
);
Expand Down

0 comments on commit 3973f1f

Please sign in to comment.