From 9be42a7fe54b0a069b816c810931d4565631d6f8 Mon Sep 17 00:00:00 2001 From: mingkuang Date: Sat, 14 Sep 2024 10:32:14 +0800 Subject: [PATCH] =?UTF-8?q?Fea=20#71,=20=E6=96=B0=E5=A2=9EGetPointerDevice?= =?UTF-8?q?Rects=EF=BC=88QT6.5=E6=94=AF=E6=8C=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ext-ms-win-rtcore-ntuser-wmpointer.hpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Thunks/ext-ms-win-rtcore-ntuser-wmpointer.hpp b/src/Thunks/ext-ms-win-rtcore-ntuser-wmpointer.hpp index 558db89..d422354 100644 --- a/src/Thunks/ext-ms-win-rtcore-ntuser-wmpointer.hpp +++ b/src/Thunks/ext-ms-win-rtcore-ntuser-wmpointer.hpp @@ -428,4 +428,30 @@ return FALSE; } #endif + + +#if (YY_Thunks_Target < __WindowsNT6_2) + + // 最低受支持的客户端 Windows 8 [仅限桌面应用] + // 最低受支持的服务器 Windows Server 2012 [仅限桌面应用] + __DEFINE_THUNK( + user32, + 12, + BOOL, + WINAPI, + GetPointerDeviceRects, + _In_ HANDLE _hDevice, + _Out_writes_(1) RECT* _pPointerDeviceRect, + _Out_writes_(1) RECT* _pDisplayRect + ) + { + if (const auto _pfnGetPointerDeviceRects = try_get_GetPointerDeviceRects()) + { + return _pfnGetPointerDeviceRects(_hDevice, _pPointerDeviceRect, _pDisplayRect); + } + + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } +#endif }