From 17f5005b63f8c903d792ac321341bc17cb723512 Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Sat, 10 Jun 2017 13:15:58 +0300 Subject: [PATCH] safely cast from 32bit long to 64bit HWND --- QuickLook.Native.Shell32/Shell32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QuickLook.Native.Shell32/Shell32.cpp b/QuickLook.Native.Shell32/Shell32.cpp index 9e4409e..17c14ba 100644 --- a/QuickLook.Native.Shell32/Shell32.cpp +++ b/QuickLook.Native.Shell32/Shell32.cpp @@ -103,7 +103,7 @@ void Shell32::getSelectedFromDesktop(PWCHAR buffer) if (FAILED(psw->FindWindowSW(&pvarLoc, &pvarLoc, SWC_DESKTOP, &phwnd, SWFO_NEEDDISPATCH, reinterpret_cast(&pwba)))) return; - if (isCursorActivated(reinterpret_cast(phwnd))) + if (isCursorActivated(reinterpret_cast(LongToHandle(phwnd)))) return; getSelectedInternal(pwba, buffer);