An application can use a private atom table to efficiently manage a large number of strings that are used only within the application. The strings in a private atom table, and the resulting atoms, are available only to the application that created the table.
An application that must use the same string in a number of data structures can save data-segment space by using a private atom table. Rather than copying the string into each data structure, the application can place the string in the atom table and use the resultant atom in the data structures. In this way, a string that appears only once in the data segment still can be used many times in the application.
Applications also can use private atom tables to save time when searching for a particular string. To perform a search, an application must place the search string in the atom table only once, then compare the resultant atom with the atoms in the relevant data structures. This usually is faster than doing string comparisons.
Every atom table has a unique handle. An application must obtain the handle before performing any atom operations. To create a private atom table and obtain its handle, an application must use WinCreateAtomTable. The atom-table handle returned by this call must be used for all other atom functions.
An application that no longer needs its private atom table should call WinDestroyAtomTable to destroy the table and free the memory that the system allocated for the table.