GlobalFindAtomA function (winbase.h)
Searches the global atom table for the specified character string and retrieves the global atom associated with that string.
Syntax
ATOM GlobalFindAtomA(
[in] LPCSTR lpString
);
Parameters
[in] lpString
Type: LPCTSTR
The null-terminated character string for which to search.
Alternatively, you can use an integer atom that has been converted using the MAKEINTATOM macro. See the Remarks for more information.
Return value
Type: ATOM
If the function succeeds, the return value is the global 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 as it was originally entered, the search performed by GlobalFindAtom 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.
Note
The winbase.h header defines GlobalFindAtom as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
See also
Reference