Author: jimtabor
Date: Thu Jun 30 15:48:20 2016
New Revision: 71704
URL:
http://svn.reactos.org/svn/reactos?rev=71704&view=rev
Log:
[NtUser]
- Use internal function to validate menu handle. See CORE-11479 for more information.
Modified:
trunk/reactos/win32ss/user/ntuser/menu.c
trunk/reactos/win32ss/user/ntuser/menu.h
trunk/reactos/win32ss/user/ntuser/window.h
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Thu Jun 30 15:48:20 2016
@@ -241,6 +241,15 @@
EngSetLastError(Error);
return pMenu;
}
+
+BOOL
+FASTCALL
+IntIsMenu(HMENU Menu)
+{
+ if (UserGetMenuObject(Menu)) return TRUE;
+ return FALSE;
+}
+
PMENU WINAPI
IntGetMenu(HWND hWnd)
Modified: trunk/reactos/win32ss/user/ntuser/menu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.h…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.h [iso-8859-1] Thu Jun 30 15:48:20 2016
@@ -122,6 +122,8 @@
//
//
+BOOL FASTCALL IntIsMenu(HMENU);
+
PMENU FASTCALL
IntGetMenuObject(HMENU hMenu);
Modified: trunk/reactos/win32ss/user/ntuser/window.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.h [iso-8859-1] Thu Jun 30 15:48:20 2016
@@ -16,7 +16,7 @@
#define HAS_THINFRAME(Style, ExStyle) \
(((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
-#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD)
&& pWnd->IDMenu)
+#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD)
&& IntIsMenu(UlongToHandle(pWnd->IDMenu)))
#define IntIsDesktopWindow(WndObj) \
(WndObj->spwndParent == NULL)