diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ccead35..48f57d8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -92,7 +92,7 @@ jobs: strategy: fail-fast: false matrix: - msrv: ["1.68"] + msrv: ["1.71"] steps: - uses: actions/checkout@v4 with: diff --git a/windivert-sys/Cargo.toml b/windivert-sys/Cargo.toml index ebe181b..bdd8b3e 100644 --- a/windivert-sys/Cargo.toml +++ b/windivert-sys/Cargo.toml @@ -11,7 +11,7 @@ categories = ["external-ffi-bindings"] readme = "../README.md" license = "LGPL-3.0-or-later" edition = "2021" -rust-version = "1.68" +rust-version = "1.71" links = "WinDivert" build = "build/main.rs" diff --git a/windivert/src/divert/mod.rs b/windivert/src/divert/mod.rs index 66e65a9..e2b5793 100644 --- a/windivert/src/divert/mod.rs +++ b/windivert/src/divert/mod.rs @@ -189,15 +189,15 @@ impl WinDivert<()> { /// Method that tries to uninstall WinDivert driver. pub fn uninstall() -> WinResult<()> { - let status: *mut SERVICE_STATUS = MaybeUninit::uninit().as_mut_ptr(); + let mut status = MaybeUninit::::uninit(); unsafe { let manager = OpenSCManagerA(None, None, SC_MANAGER_ALL_ACCESS)?; let service = OpenServiceA( manager, - PCSTR::from_raw("WinDivert".as_ptr()), + PCSTR::from_raw("WinDivert\0".as_ptr()), SC_MANAGER_ALL_ACCESS, )?; - let res = ControlService(service, SERVICE_CONTROL_STOP, status); + let res = ControlService(service, SERVICE_CONTROL_STOP, status.as_mut_ptr()); if !res.as_bool() { return Err(WinError::from(GetLastError())); }