Skip to content

Commit

Permalink
feat(ffi): replace winapi import with windows-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestTvarynka committed Sep 22, 2023
1 parent 8cf83ca commit 8610f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ tracing-subscriber = { version = "0.3", features = ["std", "fmt", "local-time",
[target.'cfg(windows)'.dependencies]
symbol-rename-macro = { path = "./symbol-rename-macro" }
winapi = "0.3"
windows-sys = { version = "0.48", features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Foundation"] }
windows-sys = { version = "0.48", features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Foundation", "Win32_Graphics_Gdi"] }
6 changes: 3 additions & 3 deletions ffi/src/sec_winnt_auth_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use symbol_rename_macro::rename_symbol;
#[cfg(feature = "scard")]
use winapi::um::wincred::CredIsMarshaledCredentialW;
#[cfg(feature = "tsssp")]
use winapi::um::wincred::{CredUIPromptForWindowsCredentialsW, CREDUI_INFOW};
use windows_sys::Win32::Security::Credentials::{CredUIPromptForWindowsCredentialsW, CREDUI_INFOW};

use crate::sspi_data_types::{SecWChar, SecurityStatus};
#[cfg(feature = "tsssp")]
Expand Down Expand Up @@ -192,10 +192,10 @@ unsafe fn credssp_auth_data_to_identity_buffers(p_auth_data: *const c_void) -> R
let caption = string_to_utf16("Enter credentials\0");
let mut cred_ui_info = CREDUI_INFOW {
cbSize: std::mem::size_of::<CREDUI_INFOW>().try_into().unwrap(),
hwndParent: null_mut(),
hwndParent: 0,
pszMessageText: message.as_ptr() as *const _,
pszCaptionText: caption.as_ptr() as *const _,
hbmBanner: null_mut(),
hbmBanner: 0,
};
let mut auth_package_count = 0;
let mut out_buffer_size = 1024;
Expand Down

0 comments on commit 8610f84

Please sign in to comment.