From 66e86a58c6029f2a1e9935867d2c984a1cdfc89b Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Sat, 16 Mar 2024 13:09:19 +0800 Subject: [PATCH] fix --- Sandboxie/core/dll/gdi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sandboxie/core/dll/gdi.c b/Sandboxie/core/dll/gdi.c index e231e6cb..f85ba776 100644 --- a/Sandboxie/core/dll/gdi.c +++ b/Sandboxie/core/dll/gdi.c @@ -292,7 +292,7 @@ _FX BOOL Gui_BitBlt( if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index); - GET_WIN_API(GetDeviceCaps, DllName_gdi32); + P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret; int iWidth = GetDeviceCaps(hdc, HORZRES), iHeight = GetDeviceCaps(hdc, VERTRES); int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES); if (iWidth == iWidth2 && iHeight == iHeight2) { @@ -320,7 +320,7 @@ _FX BOOL Gui_StretchBlt( if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index); - GET_WIN_API(GetDeviceCaps, DllName_gdi32); + P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret; int iWidth = GetDeviceCaps(hdcDest, HORZRES), iHeight = GetDeviceCaps(hdcDest, VERTRES); int iWidth2 = GetDeviceCaps(__sys_GetDC(NULL), HORZRES), iHeight2 = GetDeviceCaps(__sys_GetDC(NULL), VERTRES); if (iWidth == iWidth2 && iHeight == iHeight2) {