An application can find out if a particular string is already in an atom table by using WinFindAtom. WinFindAtom searches the atom table for the specified string and, if the string is there, returns the corresponding atom.
There are two functions that an application can use to retrieve a string from an atom table, provided that the application has the atom corresponding to the desired string. The first, WinQueryAtomLength, returns the length of the string corresponding to the atom. This allows the application to create a buffer of the appropriate size for the string. The second, WinQueryAtomName, retrieves the string and copies it to the buffer.