NtAddAtom - NtDoc

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

//
// Global atoms
//

/**
 * The NtAddAtom routine adds a Unicode string to the system atom table and
 * returns the corresponding atom identifier.
 *
 * \param AtomName A pointer to a Unicode string containing the atom name.
 * \param Length The length, in bytes, of the string pointed to by AtomName.
 * \param Atom An optional pointer that receives the resulting atom identifier.
 * \return NTSTATUS Successful or errant status.
 * \remarks If the atom already exists, its reference count is incremented and
 * the existing atom identifier is returned.
 * \see https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-addatomw
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtAddAtom(
    _In_reads_bytes_opt_(Length) PCWSTR AtomName,
    _In_ ULONG Length,
    _Out_opt_ PRTL_ATOM Atom
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwAddAtom(
    _In_reads_bytes_opt_(Length) PCWSTR AtomName,
    _In_ ULONG Length,
    _Out_opt_ PRTL_ATOM Atom
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

Function NtAddAtom creates new Atom in Global Atom Table. If Atom with the same name already exist, internal Atom counter is incremented.

AtomName

UNICODE Atom name.

Atom

Result of call - pointer to RTL_ATOM.

Documented by

See also