Set last error to ERROR_INVALID_PARAMETER in NtGdiGetRandomRgn if invalid hdc is...
authorRafal Harabien <rafalh@reactos.org>
Mon, 21 Mar 2011 14:32:46 +0000 (14:32 +0000)
committerRafal Harabien <rafalh@reactos.org>
Mon, 21 Mar 2011 14:32:46 +0000 (14:32 +0000)
Fixes gdi32:GetClipRgn apitest

svn path=/trunk/; revision=51106

reactos/subsystems/win32/win32k/objects/dcobjs.c

index 7e6870b..6a7cf20 100644 (file)
@@ -367,7 +367,7 @@ NtGdiSelectBitmap(
         REGION_FreeRgnByHandle(hVisRgn);
     }
 
-    /* Return the old bitmp handle */
+    /* Return the old bitmap handle */
     return hbmpOld;
 }
 
@@ -522,7 +522,7 @@ NtGdiGetRandomRgn(
     pdc = DC_LockDc(hdc);
     if (!pdc)
     {
-        EngSetLastError(ERROR_INVALID_HANDLE);
+        EngSetLastError(ERROR_INVALID_PARAMETER);
         return -1;
     }