DeleteAtom
Collapse the table of content
Expand the table of content

DeleteAtom function

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.

Syntax


ATOM WINAPI DeleteAtom(
  _In_ ATOM nAtom
);

Parameters

nAtom [in]

Type: ATOM

The atom to be deleted.

Return value

Type: ATOM

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Reference
AddAtom
FindAtom
GlobalAddAtom
GlobalDeleteAtom
GlobalFindAtom
MAKEINTATOM

 

 

Community Additions

ADD
Show:
© 2016 Microsoft