Jump to content

WinQueryAtomUsage

From EDM2
Revision as of 22:28, 10 December 2023 by Martini (talk | contribs) (Created page with "This function returns the number of times an atom has been used. ==Syntax== WinQueryAtomUsage(hatomtblAtomTbl, atom); ==Parameters== ; hatomtblAtomTbl (HATOMTBL) - input :A...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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