Author: janderwald
Date: Sun Jul 16 16:24:09 2006
New Revision: 23075
URL:
http://svn.reactos.org/svn/reactos?rev=23075&view=rev
Log:
* dont succeed if found Class is local and hInstance is NULL
* set hInstance to input value given when nonzero, zero for global classes and to the
actual value of class when its local
* reduces the user32_winetest.exe failures by 20 error to 44
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/class.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/class.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c Sun Jul 16 16:24:09 2006
@@ -1772,7 +1772,8 @@
static BOOL
UserGetClassInfo(IN PWINDOWCLASS Class,
OUT PWNDCLASSEXW lpwcx,
- IN BOOL Ansi)
+ IN BOOL Ansi,
+ HINSTANCE hInstance)
{
lpwcx->style = Class->Style;
@@ -1783,7 +1784,6 @@
lpwcx->cbClsExtra = Class->ClsExtra;
lpwcx->cbWndExtra = Class->WndExtra;
- lpwcx->hInstance = Class->hInstance;
lpwcx->hIcon = Class->hIcon; /* FIXME - get handle from pointer */
lpwcx->hCursor = Class->hCursor; /* FIXME - get handle from pointer */
lpwcx->hbrBackground = Class->hbrBackground;
@@ -1792,6 +1792,13 @@
((PWNDCLASSEXA)lpwcx)->lpszMenuName = Class->AnsiMenuName;
else
lpwcx->lpszMenuName = Class->MenuName;
+
+ if (hInstance)
+ lpwcx->hInstance = hInstance;
+ else if (Class->Global)
+ lpwcx->hInstance = NULL;
+ else
+ lpwcx->hInstance = Class->hInstance;
lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->Atom); /* FIXME - return the
string? */
@@ -2154,7 +2161,8 @@
{
Ret = UserGetClassInfo(Class,
lpWndClassEx,
- Ansi);
+ Ansi,
+ hInstance);
if (Ret)
{
@@ -2173,6 +2181,11 @@
/* Undocumented behavior! Return the class atom as a BOOL! */
Ret = (BOOL)ClassAtom;
+
+ if (!(Class->Global || Class->System) && hInstance ==
NULL)
+ {
+ Ret = FALSE;
+ }
}
}
}