The system atom table is available to all applications. When an application places a string in the system atom table, any application that has the atom name can obtain the atom by querying the system atom table.

An application that defines messages, clipboard-data formats, or dynamic data exchange (DDE) data formats that are intended for use among applications must place the names of the messages or formats in the system atom table. It avoids possible conflicts with messages or formats defined by the system or other applications, and makes the atoms for the messages or formats available to other applications. Applications should use names that are not likely to be used by other applications for other purposes.

Some PM functions enable applications to use atoms in parameters that normally take pointers to strings. For example, WinRegisterClass takes a pointer to a string for its pszClassName parameter. WinRegisterClass places the class name string in the system atom table. Afterward, an application can query the system atom table to obtain the atom, then use the atom as the pszClientClass parameter of WinCreateStdWindow. This process can save space in the data segment of applications that create many windows of the same private class. Every atom table has a unique handle. An application must obtain the handle before performing any atom operations. To obtain the handle of the system atom table, an application uses WinQuerySystemAtomTable. The atom-table handle returned by this call is used for all other atom functions.


[Back] [Next]