- Implement support function adding global atoms in win32k.

svn path=/trunk/; revision=41719
This commit is contained in:
James Tabor 2009-06-30 19:12:02 +00:00
parent 95f968d50b
commit 5ad493ce71
2 changed files with 20 additions and 0 deletions

View file

@ -5,5 +5,6 @@ RTL_ATOM FASTCALL
IntAddAtom(LPWSTR AtomName);
ULONG FASTCALL
IntGetAtomName(RTL_ATOM nAtom, LPWSTR lpBuffer, ULONG nSize);
RTL_ATOM FASTCALL IntAddGlobalAtom(LPWSTR,BOOL);
#endif /* _WIN32K_USERATOM_H */

View file

@ -79,4 +79,23 @@ IntGetAtomName(RTL_ATOM nAtom, LPWSTR lpBuffer, ULONG nSize)
return Size;
}
RTL_ATOM FASTCALL
IntAddGlobalAtom(LPWSTR lpBuffer, BOOL PinAtom)
{
RTL_ATOM Atom;
NTSTATUS Status = STATUS_SUCCESS;
Status = RtlAddAtomToAtomTable(gAtomTable, lpBuffer, &Atom);
if (!NT_SUCCESS(Status))
{
DPRINT1("Error init Global Atom.\n");
return 0;
}
if ( Atom && PinAtom ) RtlPinAtomInAtomTable(gAtomTable, Atom);
return Atom;
}
/* EOF */