Author: fireball Date: Thu Jun 15 01:03:34 2006 New Revision: 22349
URL: http://svn.reactos.ru/svn/reactos?rev=22349&view=rev Log: - Johannes Anderwald and Thomas Weidenmueller: WIN32K: window class fixes (bug 1570) - Reduces user32_winetest class failures from 85 to 64 - The patch doesn't introduce obvious regressions (reactos boots, explorer works, miranda and mirc loads)
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntus... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/class.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c Thu Jun 15 01:03:34 2006 @@ -1366,7 +1366,7 @@ ClassName->Buffer, &BufLen);
- if (NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { SetLastNtError(Status); _SEH_LEAVE; @@ -1396,7 +1396,7 @@ { ULONG_PTR Ret = 0;
- if (Index > 0) + if (Index >= 0) { PULONG_PTR Data;
@@ -1407,7 +1407,7 @@ return 0; }
- Data = (PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset); + Data = (PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset + Index);
/* FIXME - Data might be a unaligned pointer! Might be a problem on certain architectures, maybe using RtlCopyMemory is a @@ -1592,7 +1592,7 @@ /* change the information in the base class first, then update the clones */ Class = Class->Base;
- if (Index > 0) + if (Index >= 0) { PULONG_PTR Data;
@@ -1603,7 +1603,7 @@ return 0; }
- Data = (PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset); + Data = (PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset + Index);
/* FIXME - Data might be a unaligned pointer! Might be a problem on certain architectures, maybe using RtlCopyMemory is a @@ -1615,7 +1615,7 @@ Class = Class->Clone; while (Class != NULL) { - *(PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset) = NewLong; + *(PULONG_PTR)((ULONG_PTR)Class + Class->ClassExtraDataOffset + Index) = NewLong; Class = Class->Next; }
@@ -2170,6 +2170,9 @@ (PVOID)Class->AnsiMenuName : (PVOID)Class->MenuName)); } + + /* Undocumented behavior! Return the class atom as a BOOL! */ + Ret = (BOOL)ClassAtom; } } }