From f79c01b0cf564739d494f3e605da713fd2944a52 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 28 Jan 2021 18:51:49 +0100 Subject: [PATCH] Fix HINSTANCE returned by raw_window_handle on 64 bit Windows (#1841) --- src/platform_impl/windows/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform_impl/windows/window.rs b/src/platform_impl/windows/window.rs index 575e4da7..4684f32a 100644 --- a/src/platform_impl/windows/window.rs +++ b/src/platform_impl/windows/window.rs @@ -278,7 +278,7 @@ impl Window { #[inline] pub fn hinstance(&self) -> HINSTANCE { - unsafe { winuser::GetWindowLongW(self.hwnd(), winuser::GWL_HINSTANCE) as *mut _ } + unsafe { winuser::GetWindowLongPtrW(self.hwnd(), winuser::GWLP_HINSTANCE) as *mut _ } } #[inline]