diff --git a/Sandboxie/core/dll/guimisc.c b/Sandboxie/core/dll/guimisc.c index 9a885883..22367e7a 100644 --- a/Sandboxie/core/dll/guimisc.c +++ b/Sandboxie/core/dll/guimisc.c @@ -1472,12 +1472,12 @@ _FX BOOL Gui_ImmAssociateContextEx( _FX HDC Gui_GetDC(HWND hWnd) { if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { - if (hWnd == NULL || hWnd == GetDesktopWindow()) { + if (hWnd == NULL || hWnd == __sys_GetDesktopWindow()) { SetLastError(ERROR_ACCESS_DENIED); return NULL; } ULONG_PTR pid=0, tid=0; - if (!Gui_IsSameBox(hWnd, pid, tid)) { + if (!Gui_IsSameBox(hWnd, &pid, &tid)) { SetLastError(ERROR_ACCESS_DENIED); return NULL; } @@ -1488,12 +1488,12 @@ _FX HDC Gui_GetDC(HWND hWnd) _FX HDC Gui_GetWindowDC(HWND hWnd) { if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { - if (hWnd == NULL || hWnd == GetDesktopWindow()) { + if (hWnd == NULL || hWnd == __sys_GetDesktopWindow()) { SetLastError(ERROR_ACCESS_DENIED); return NULL; } ULONG_PTR pid = 0, tid = 0; - if (!Gui_IsSameBox(hWnd, pid, tid)) { + if (!Gui_IsSameBox(hWnd, &pid, &tid)) { SetLastError(ERROR_ACCESS_DENIED); return NULL; } @@ -1504,12 +1504,13 @@ _FX HDC Gui_GetWindowDC(HWND hWnd) _FX HDC Gui_GetDCEx(HWND hWnd,HRGN hrgnClip,DWORD flags) { if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) { - if (hWnd == NULL || hWnd == GetDesktopWindow()) { + if (hWnd == NULL || hWnd == __sys_GetDesktopWindow()) { SetLastError(ERROR_ACCESS_DENIED); return NULL; } ULONG_PTR pid = 0, tid = 0; - if (!Gui_IsSameBox(hWnd, pid, tid)) { + + if (!Gui_IsSameBox(hWnd, &pid, &tid)) { SetLastError(ERROR_ACCESS_DENIED); return NULL; }