Alexandre Julliard : user32: Set last error in WIN_GetRectangles.

Alexandre Julliard julliard at winehq.org
Mon Oct 12 11:19:48 CDT 2009


Module: wine
Branch: master
Commit: 5db3e7d43ed99ebcedc87c3e7da00e29def0cc2e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5db3e7d43ed99ebcedc87c3e7da00e29def0cc2e

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct 12 15:51:12 2009 +0200

user32: Set last error in WIN_GetRectangles.

---

 dlls/user32/win.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index be40018..333b6b6 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -661,7 +661,11 @@ BOOL WIN_GetRectangles( HWND hwnd, RECT *rectWindow, RECT *rectClient )
     WND *win = WIN_GetPtr( hwnd );
     BOOL ret = TRUE;
 
-    if (!win) return FALSE;
+    if (!win)
+    {
+        SetLastError( ERROR_INVALID_WINDOW_HANDLE );
+        return FALSE;
+    }
     if (win == WND_DESKTOP)
     {
         RECT rect;
@@ -684,7 +688,7 @@ BOOL WIN_GetRectangles( HWND hwnd, RECT *rectWindow, RECT *rectClient )
         SERVER_START_REQ( get_window_rectangles )
         {
             req->handle = wine_server_user_handle( hwnd );
-            if ((ret = !wine_server_call( req )))
+            if ((ret = !wine_server_call_err( req )))
             {
                 if (rectWindow)
                 {




More information about the wine-cvs mailing list