WinQueryAtomUsage: Difference between revisions
Appearance
Created page with "This function returns the number of times an atom has been used. ==Syntax== WinQueryAtomUsage(hatomtblAtomTbl, atom); ==Parameters== ; hatomtblAtomTbl (HATOMTBL) - input :A..." |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
This function returns the number of times an atom has been used. | This function returns the number of times an atom has been used. | ||
==Syntax== | ==Syntax== | ||
WinQueryAtomUsage(hatomtblAtomTbl, atom) | WinQueryAtomUsage(hatomtblAtomTbl, atom) | ||
==Parameters== | ==Parameters== | ||
; hatomtblAtomTbl (HATOMTBL) - input | ;hatomtblAtomTbl (HATOMTBL) - input:Atom-table handle. | ||
: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. | ||
==Returns== | ==Returns== | ||
;ulcount (ULONG) - returns | ;ulcount ([[ULONG]]) - returns:Use count of the atom. | ||
:Use count of the atom. | ::65535 - Integer atom | ||
::0 - The specified atom or the atom table is invalid | |||
::Other - Use count. | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INVALID_HATOMTBL (0x1013) | ;PMERR_INVALID_HATOMTBL (0x1013):An invalid atom-table handle was specified. | ||
:An invalid atom-table handle was specified. | ;PMERR_INVALID_ATOM (0x1014):The specified atom does not exist in the atom table. | ||
;PMERR_INVALID_ATOM (0x1014) | |||
:The specified atom does not exist in the atom table. | |||
==Example Code== | ==Example Code== | ||
This function returns the number of times an atom has been used. | This function returns the number of times an atom has been used. | ||
<pre> | <pre> | ||
#define INCL_WINATOM | #define INCL_WINATOM | ||
#include <OS2.H> | #include <OS2.H> | ||
Line 39: | Line 30: | ||
WinQueryAtomlength(atomtbl, atom); | WinQueryAtomlength(atomtbl, atom); | ||
</pre> | </pre> | ||
Line 51: | Line 41: | ||
ULONG ulcount; /* Use count of the atom. */ | ULONG ulcount; /* Use count of the atom. */ | ||
ulcount = WinQueryAtomUsage(hatomtblAtomTbl, | ulcount = WinQueryAtomUsage(hatomtblAtomTbl, atom); | ||
</pre> | </pre> | ||
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);