win12.hlp (Table of Contents; Topic list)
WinAddAtom (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINATOM
 
ATOM WinAddAtom(hAtomTbl, pszAtomName)
HATOMTBL hAtomTbl;    /* handle to the atom table                */
PSZ pszAtomName;      /* address of the buffer for the atom name */
 
The WinAddAtom function adds an atom to an atom table and sets its use count
to 1. If the atom name already exists in the table, this function adds 1 to
its use count.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hAtomTbl     Identifies the atom table. This handle must have been created
             by a previous call to the WinCreateAtomTable or
             WinQuerySystemAtomTable function.
 
pszAtomName  Points to the null-terminated character string that contains an
             atom name to be added to the table. If the string begins with a
             "#" character, the ASCII digits that follow are converted into
             a 16-bit integer. If this integer is a valid integer atom, this
             function returns that atom without actually modifying the atom
             table. If the string begins with an "!" character, the next two
             bytes are interpreted as an atom.
 
             If the high word of pszAtomName is 0xFFFF, the low word is
             treated as an atom. If it is an integer atom, that atom is
             returned. Otherwise the reference count associated with that
             atom is increased by one and the atom is returned.
 
Return Value
 
The return value is the atom associated with the passed string or NULL. The
return value is zero if an invalid atom table or atom name was specified.
 
See Also
 
WinCreateAtomTable, WinDeleteAtom, WinFindAtom, WinQueryAtomLength,
WinQueryAtomName, WinQueryAtomUsage