Author: jimtabor
Date: Fri Nov 16 23:23:49 2012
New Revision: 57716
URL:
http://svn.reactos.org/svn/reactos?rev=57716&view=rev
Log:
[PSDK|User32]
- Fix error return for future wine Win.c test_map_points tests.
- Add missing error code.
Modified:
trunk/reactos/include/psdk/winerror.h
trunk/reactos/win32ss/user/user32/misc/misc.c
Modified: trunk/reactos/include/psdk/winerror.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winerror.h?re…
==============================================================================
--- trunk/reactos/include/psdk/winerror.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winerror.h [iso-8859-1] Fri Nov 16 23:23:49 2012
@@ -838,6 +838,7 @@
#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459
#define ERROR_TIMEOUT 1460
#define ERROR_INVALID_MONITOR_HANDLE 1461
+#define ERROR_INCORRECT_SIZE 1462
#define ERROR_EVENTLOG_FILE_CORRUPT 1500
#define ERROR_EVENTLOG_CANT_START 1501
#define ERROR_LOG_FILE_FULL 1502
Modified: trunk/reactos/win32ss/user/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/m…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] Fri Nov 16 23:23:49 2012
@@ -281,6 +281,8 @@
{
INT Index;
USHORT generation;
+
+ if (!handle) return NULL;
Index = (((UINT_PTR)handle & 0xffff) - FIRST_USER_HANDLE) >> 1;
@@ -435,21 +437,14 @@
FASTCALL
ValidateHwnd(HWND hwnd)
{
- PWND Wnd;
PCLIENTINFO ClientInfo = GetWin32ClientInfo();
ASSERT(ClientInfo != NULL);
/* See if the window is cached */
- if (hwnd == ClientInfo->CallbackWnd.hWnd)
+ if (hwnd && hwnd == ClientInfo->CallbackWnd.hWnd)
return ClientInfo->CallbackWnd.pWnd;
- Wnd = ValidateHandle((HANDLE)hwnd, otWindow);
- if (Wnd != NULL)
- {
- return Wnd;
- }
-
- return NULL;
+ return ValidateHandle((HANDLE)hwnd, otWindow);
}
//