ATOM

From ReliCodia

(Difference between revisions)

Revision as of 01:27, 28 November 2004

Windows provides a system-wide repository for strings. When you add a string to this repository by calling GlobalAddAtom, you get back a system-wide identifier, called an atom. You can easily pass this atom around--it's just a WORD--and everybody can translate it back to string by calling GlobalGetAtomName.

Atoms are a convenient way of passing strings between applications. For instance, they can be passed as a WPARAM in a registered Windows message.

Atoms are reference counted. Every call to GlobalAddAtom increases the atom's global reference count. To free an atom, each client should call GlobalDeleteAtom.