diff --git a/Cargo.toml b/Cargo.toml index d346019..77870dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,10 @@ rust-version = "1.56.0" default-target = "x86_64-pc-windows-msvc" [dependencies] -windows-sys = { version = "0.48", features = [ +windows-sys = { version = "0.52", features = [ "Win32_Foundation", "Win32_Security_Cryptography", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_System_Memory"] } [dev-dependencies] -windows-sys = { version = "0.48", features = ["Win32_System_SystemInformation", "Win32_System_Time"] } +windows-sys = { version = "0.52", features = ["Win32_System_SystemInformation", "Win32_System_Time"] } diff --git a/src/crypt_prov.rs b/src/crypt_prov.rs index 9e5cd0c..5c383ba 100644 --- a/src/crypt_prov.rs +++ b/src/crypt_prov.rs @@ -5,7 +5,7 @@ use std::ptr; use std::slice; use windows_sys::Win32::Security::Cryptography; -use windows_sys::Win32::System::Memory; +use windows_sys::Win32::Foundation; use crate::crypt_key::CryptKey; use crate::Inner; @@ -204,7 +204,7 @@ impl<'a> ImportOptions<'a> { let mut key = 0; let res = Cryptography::CryptImportKey(self.prov.0, buf, len, 0, self.flags, &mut key); - Memory::LocalFree(buf as isize); + Foundation::LocalFree(buf as *mut _); if res != 0 { Ok(CryptKey::from_inner(key)) @@ -239,7 +239,7 @@ impl<'a> ImportOptions<'a> { let pkey = pkey.PrivateKey; let res = self.import(slice::from_raw_parts(pkey.pbData, pkey.cbData as usize)); - Memory::LocalFree(buf as isize); + Foundation::LocalFree(buf as *mut _); res } }