Skip to content

Commit

Permalink
Update windows-rs to 0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Jan 3, 2025
1 parent bee6126 commit 8e337b6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 82 deletions.
90 changes: 12 additions & 78 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ core-foundation = "0.10.0"
core-foundation-sys = "0.8.7"

[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.48", features = [
windows-sys = { version = "0.59", features = [
"Win32_Foundation",
"Win32_System_Com",
"Win32_UI_Shell_Common",
Expand Down
2 changes: 1 addition & 1 deletion src/backend/win_cid/file_dialog/dialog_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl DialogInner {
#[inline]
unsafe fn show(&self, parent: Option<HWND>) -> Result<()> {
let (d, v) = self.fd();
wrap_err((v.base.Show)(d, parent.unwrap_or_default()))
wrap_err((v.base.Show)(d, parent.unwrap_or(std::ptr::null_mut())))
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion src/backend/win_cid/message_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl WinMessageDialog {
pub fn run(self) -> MessageDialogResult {
let ret = unsafe {
MessageBoxW(
self.parent.unwrap_or_default(),
self.parent.unwrap_or(std::ptr::null_mut()),
self.text.as_ptr(),
self.caption.as_ptr(),
self.flags,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/win_cid/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn init_com<T, F: FnOnce() -> T>(f: F) -> Result<T, HRESULT> {
let res = unsafe {
CoInitializeEx(
std::ptr::null(),
COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE,
(COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE) as u32,
)
};

Expand Down

0 comments on commit 8e337b6

Please sign in to comment.