Platform SDK: Interprocess Communications

FindAtom

The FindAtom function searches the local atom table for the specified character string and retrieves the atom associated with that string.

ATOM FindAtom(
  LPCTSTR lpString   // string to find
);

Parameters

lpString
[in] Pointer to the null-terminated character string to search for.

Alternatively, you can use an integer atom that has been converted using the MAKEINTATOM macro. See the Remarks for more information.

Return Values

If the function succeeds, the return value is the atom associated with the given string.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Even though the system preserves the case of a string in an atom table, the search performed by the FindAtom function is not case sensitive.

If lpString was created by the MAKEINTATOM macro, the low-order word must be in the range 0x0001 through 0xBFFF. If the low-order word is not in this range, the function fails.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

Atoms Overview, Atom Functions, AddAtom, DeleteAtom, GlobalAddAtom, GlobalDeleteAtom, GlobalFindAtom