Return atom length when requested. Fixes bug 793.

svn path=/trunk/; revision=17985
This commit is contained in:
Gé van Geldorp 2005-09-22 20:24:50 +00:00
parent e6e62c37b3
commit cb0c6e6a48
2 changed files with 9 additions and 1 deletions

View file

@ -610,6 +610,10 @@ RtlQueryAtomInAtomTable(PRTL_ATOM_TABLE AtomTable,
*NameLength = Length;
}
}
else if (NameLength != NULL)
{
*NameLength = (Entry->NameLength + 1) * sizeof(WCHAR);
}
return Status;
}
@ -651,6 +655,10 @@ RtlQueryAtomInAtomTable(PRTL_ATOM_TABLE AtomTable,
*NameLength = Length;
}
}
else if (NameLength != NULL)
{
*NameLength = (Entry->NameLength + 1) * sizeof(WCHAR);
}
}
else
{

View file

@ -208,7 +208,7 @@ IntGetClassName(struct _WINDOW_OBJECT *WindowObject, LPWSTR lpClassName,
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))