/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/// C FFI for `get_conflicting_mitigations` /// /// Checks the current process to see if any conflicting mitigations would be enabled /// by Windows Exploit Protection /// /// `conflicting_mitigations` is an out pointer that will receive the status of the /// Win32k conflicting mitigations /// /// On success, returns `1`. On failure, returns `0` and `conflicting_mitigations` is left /// untouched /// /// # Safety /// /// `conflicting_mitigations` must not be a non-const, non-null ptr and **must be initialized** /// /// # Example /// /// ```C++ /// void myFunc() { /// ConflictingMitigationStatus status = {}; // GOOD - value-initializes the object /// if(!detect_win32k_conflicting_mitigations(&status)) { /// // error /// } /// } /// ``` #[no_mangle] pubunsafeextern"C"fn detect_win32k_conflicting_mitigations(
conflicting_mitigations: &mut ConflictingMitigationStatus,
) -> bool { let process_path =
std::env::current_exe().expect("unable to determine the path of our executable"); let file_name = process_path
.file_name()
.expect("executable doesn't have a file name");
match get_conflicting_mitigations(file_name) {
Ok(status) => {
*conflicting_mitigations = status; true
}
Err(e) => {
log::error!( "Failed to get Win32k Lockdown conflicting mitigation status: {}",
e
); false
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-08-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.