diff --git a/ThunksList.md b/ThunksList.md index ead148f..3db48f4 100644 --- a/ThunksList.md +++ b/ThunksList.md @@ -748,6 +748,7 @@ | GetPointerTouchInfoHistory | 报告错误 ERROR_INVALID_PARAMETER。 | IsMouseInPointerEnabled | 返回关闭。 | EnableMouseInPointer | 假装处于关闭状态。 +| GetPointerDeviceRects | 报告错误 ERROR_INVALID_PARAMETER。 ## userenv.dll | 函数 | Fallback 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 }