WinQueryAtomUsage
Appearance
This function returns the number of times an atom has been used.
Syntax
WinQueryAtomUsage(hatomtblAtomTbl, atom)
Parameters
- hatomtblAtomTbl (HATOMTBL) - input
- Atom-table handle.
- The handle returned from a previous WinCreateAtomTable or WinQuerySystemAtomTable function.
- atom (ATOM) - input
- Atom whose use count is to be returned.
Returns
- ulcount (ULONG) - returns
- Use count of the atom.
- 65535 - Integer atom
- 0 - The specified atom or the atom table is invalid
- Other - Use count.
Errors
Possible returns from WinGetLastError
- PMERR_INVALID_HATOMTBL (0x1013)
- An invalid atom-table handle was specified.
- PMERR_INVALID_ATOM (0x1014)
- The specified atom does not exist in the atom table.
Example Code
This function returns the number of times an atom has been used.
#define INCL_WINATOM #include <OS2.H> HATOMTBL atomtbl; ATOM atom = 25; WinQueryAtomlength(atomtbl, atom);
Definition
#define INCL_WINATOM /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HATOMTBL hatomtblAtomTbl; /* Atom-table handle. */ ATOM atom; /* Atom whose use count is to be returned. */ ULONG ulcount; /* Use count of the atom. */ ulcount = WinQueryAtomUsage(hatomtblAtomTbl, atom);