Return atom length when requested. Fixes bug 793.
Modified: trunk/reactos/lib/rtl/atom.c
Modified: trunk/reactos/subsys/win32k/ntuser/class.c
_____
Modified: trunk/reactos/lib/rtl/atom.c
--- trunk/reactos/lib/rtl/atom.c 2005-09-22 20:17:55 UTC (rev
17984)
+++ trunk/reactos/lib/rtl/atom.c 2005-09-22 20:24:50 UTC (rev
17985)
@@ -610,6 +610,10 @@
*NameLength = Length;
}
}
+ else if (NameLength != NULL)
+ {
+ *NameLength = (Entry->NameLength + 1) * sizeof(WCHAR);
+ }
return Status;
}
@@ -651,6 +655,10 @@
*NameLength = Length;
}
}
+ else if (NameLength != NULL)
+ {
+ *NameLength = (Entry->NameLength + 1) * sizeof(WCHAR);
+ }
}
else
{
_____
Modified: trunk/reactos/subsys/win32k/ntuser/class.c
--- trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-22 20:17:55 UTC
(rev 17984)
+++ trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-22 20:24:50 UTC
(rev 17985)
@@ -208,7 +208,7 @@
Length = 0;
Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,
WindowObject->Class->Atom, NULL,
NULL, NULL, &Length);
- Name = ExAllocatePoolWithTag(PagedPool, Length +
sizeof(UNICODE_NULL), TAG_STRING);
+ Name = ExAllocatePoolWithTag(PagedPool, Length, TAG_STRING);
Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable,
WindowObject->Class->Atom, NULL,
NULL, Name, &Length);
if (!NT_SUCCESS(Status))