Using Atoms (Windows Embedded CE 6.0)

1/6/2010

An atom is a 16-bit integer that identifies a string that an application stores together with the atom in an operating system (OS) defined table known as an atom table. The application can later use the atom to access the string. A string that an application places in an atom table is called an atom name.

Several Windows Embedded CE–based functions accept either strings or atoms as parameters. When an application passes an atom to these functions, an application can use the MAKEINTATOM macro to convert the atom into a form that the function can use.

The following table lists the functions and macros that enable an application to use atoms.

Function or macro Description

GlobalAddAtom

Adds a character string to the global atom table and returns a unique value, known as an atom, that identifies string.

GlobalDeleteAtom

Decrements the reference count of a global string atom. When GlobalDeleteAtom decrements the reference count for the atom to zero, GlobalDeleteAtom removes the string associated with the atom from the global atom table.

GlobalFindAtom

Searches the global atom table for the specified character string and retrieves the global atom associated with that string.

MAKEINTATOM

Converts the specified atom into a string so that an application can pass the atom to functions that accept either atoms or strings.

See Also

Reference

Atoms Reference

Other Resources

Shell Application Development