Jump to content

WinQueryAtomUsage: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
Line 7: Line 7:
;hatomtblAtomTbl (HATOMTBL) - input:Atom-table handle.
;hatomtblAtomTbl (HATOMTBL) - input:Atom-table handle.
:The handle returned from a previous WinCreateAtomTable or WinQuerySystemAtomTable function.
:The handle returned from a previous WinCreateAtomTable or WinQuerySystemAtomTable function.
;atom (ATOM) - input:Atom whose use count is to be returned.
;atom ([[ATOM]]) - input:Atom whose use count is to be returned.


==Returns==
==Returns==
;ulcount (ULONG) - returns:Use count of the atom.
;ulcount ([[ULONG]]) - returns:Use count of the atom.
::65535 - Integer atom
::65535 - Integer atom
::0 - The specified atom or the atom table is invalid
::0 - The specified atom or the atom table is invalid

Latest revision as of 04:02, 6 April 2025

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);

Related Functions