Decrements the reference count of a local string atom. If the atom's reference count is reduced to zero, DeleteAtom removes the string associated with the atom from the local atom table.
ATOM DeleteAtom( ATOM nAtom );
The atom to be deleted.
If the function succeeds, the return value is zero.
If the function fails, the return value is the nAtom parameter. To get extended error information, call GetLastError.
A string atom's reference count specifies the number of times the atom has been added to the atom table. The AddAtom function increments the count on each call. The DeleteAtom function decrements the count on each call but removes the string only if the atom's reference count is zero.
Each call to AddAtom should have a corresponding call to DeleteAtom. Do not call DeleteAtom more times than you call AddAtom, or you may delete the atom while other clients are using it.
The DeleteAtom function has no effect on an integer atom (an atom whose value is in the range 0x0001 to 0xBFFF). The function always returns zero for an integer atom.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winbase.h (include Windows.h)|