GlobalGetAtomName

2.x

  UINT GlobalGetAtomName(atom, lpszBuffer, cbBuffer)    
  ATOM atom; /* atom identifier, */  
  LPSTR lpszBuffer; /* address of buffer for atom string */
  int cbBuffer; /* size of buffer, */  

The GlobalGetAtomName function retrieves a copy of the character string associated with the given global atom. (A global atom is an atom that is available to all Windows applications.)

Parameters

atom

Identifies the global atom associated with the character string to be retrieved.

lpszBuffer

Points to the buffer for the character string.

cbBuffer

Specifies the size, in bytes, of the buffer.

Return Value

The return value specifies the number of bytes copied to the buffer, not including the terminating null character, if the function is successful.

Example

The following example uses the GlobalGetAtomName function to retrieve the character string associated with a global atom:

char szBuf[80];

GlobalGetAtomName(atGlobal, szBuf, sizeof(szBuf));

MessageBox(hwnd, szBuf, "GlobalGetAtomName", MB_OK);