The second parameter to WinAddAtom and WinFindAtom, pszAtomName, is a pointer to zero-terminated string. An application can specify this pointer in four ways, as shown in the following table:
┌────────────────────┬────────────────────────────────────────┐ │Format Name │Description │ ├────────────────────┼────────────────────────────────────────┤ │"!",atom │Points to a string in which the atom is │ │ │passed indirectly, as a value. │ ├────────────────────┼────────────────────────────────────────┤ │#ddddd │Points to an integer atom specified as a│ │ │decimal string. │ ├────────────────────┼────────────────────────────────────────┤ │ulong: FFFF(low │Passes an atom directly. The atom is in │ │word) │the low word of the pszAtomName │ │ │parameter. The operating system uses │ │ │this format to add predefined window │ │ │classes to the system atom table. │ ├────────────────────┼────────────────────────────────────────┤ │string atom name │The pointer is to a string atom name. │ │ │Applications typically use this format │ │ │to add an atom string to an atom table │ │ │and receive an atom in return. │ └────────────────────┴────────────────────────────────────────┘
The "!",atom and ulong: FFFF(low word) formats are useful when incrementing the usage count of an existing atom for which the original atom string is not known. For example, the system clipboard manager uses the ulong: FFFF(low word) format to increment the usage count of each clipboard-format atom when that format is placed on the clipboard. By using this format, the atom is not destroyed even if the original user of the atom deletes it, because the usage count still shows that the clipboard is using the atom.