ATOM_BASIC_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * Basic atom snapshot. The fixed prefix is 6 bytes; sizeof is 8 because Name[1]
 * includes a WCHAR. On the native x64 and WoW64 paths, successful queries append
 * a NUL after the copied name. They can return STATUS_SUCCESS after truncation,
 * so NameLength is the copied byte count, not necessarily the complete name length.
 * Reserve 518 bytes (6 + 255 WCHARs + terminator) for an untruncated maximum name.
 */
typedef struct _ATOM_BASIC_INFORMATION
{
    USHORT UsageCount;   // Reference snapshot; integer atoms report 1. Not an ownership grant.
    USHORT Flags;        // Bit 0x1: pinned; bit 0x2: global-entry lowbox access flag. Not NtAddAtomEx input flags in general.
    USHORT NameLength;   // Bytes copied into Name, excluding the trailing WCHAR NUL; may be truncated.
    _Field_size_bytes_(NameLength) WCHAR Name[1]; // Variable-length name, followed by a NUL on successful query.
} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;

#endif
#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

ATOM_BASIC_INFORMATION structure is returned as a result of call NtQueryInformationAtom with AtomBasicInformation information class.

UsageCount

Internal Atom counter state. This value increments at every NtAddAtom call for current Atom, and it's decremented on every NtDeleteAtom function call.

Flags

(?), Only lowest bit is used.

NameLength

Size of Name array, in bytes.

Name[1]

Atom name.

Documented by

See also