InitAtomTable

  BOOL InitAtomTable(cTableEntries)    
  DWORD cTableEntries; /* size of atom table */

The InitAtomTable function initializes the local atom hash table and sets it to the specified size.

An application need not use this function to use a local atom table. The default size of the local and global atom hash tables is 37 table entries. If an application does use InitAtomTable, however, it should call the function before any other atom-management function.

Parameters

cTableEntries

Specifies the size, in table entries, of the atom hash table. This value should be a prime number.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

Comments

If an application uses a large number of local atoms, it can reduce the time required to add an atom to the local atom table or to find an atom in the table by increasing the size of the table. However, this increases the amount of memory required to maintain the table.

The size of the global atom table cannot be changed from its default size of 37 entries.