Alexandre Julliard : kernel32: Fix user handle conversion in GetConsoleWindow().

Alexandre Julliard julliard at winehq.org
Thu Aug 20 16:03:37 CDT 2020


Module: wine
Branch: master
Commit: 13ea90d80f7275e1ad4f3fc3c1c75b68bdbefbb4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=13ea90d80f7275e1ad4f3fc3c1c75b68bdbefbb4

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Aug 20 21:44:20 2020 +0200

kernel32: Fix user handle conversion in GetConsoleWindow().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 44df9463da..afbf9a91da 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -194,7 +194,7 @@ HWND WINAPI GetConsoleWindow(void)
 
     ret = DeviceIoControl( RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle,
                            IOCTL_CONDRV_GET_INPUT_INFO, NULL, 0, &info, sizeof(info), NULL, NULL );
-    return ret ? (HWND)info.win : NULL;
+    return ret ? wine_server_ptr_handle(info.win) : NULL;
 }
 
 




More information about the wine-cvs mailing list