I'm interest on an OS independed (or at least Linux and MacOS), Windows
ATOM like* feature, supported by FreePascal. Most similar feature found
is environment variables which are accessed by GetEnvironmentVariable()
function. There is Get function but could not find any Create or Set.
Besides documentation, already checked osutilsh.inc file in which
GetEnvironmentVariable() is declared. I think if there was any related
functions would be stored in this same interface file, right?
What I need to do:
I need to set a system wide flag so to determine if specific tasks are
executed in current system login session. If user log off or restart,
then I could know this by not finding flags in memory. Flags should not
be visible to any other program (enumeration-proof), unless it is called
by it's name.
Any directions would be most appreciated.
* Windows atoms are like system variables which can be used as flags or
as counters. This is supported by a group of Windows API functions, such
as "GlodalAddAtom, GlobalFindAtom, GlobalDeleteAtom". Atoms cannot be
enumerated or accessed if caller do not know it's specific name. So, it
a kind of safe way to pass flags or information between programs and
instances of your apps.
My advice about how to support this would be creating a class that has
Atom functions and implements them separetely on each platform.
So far we saw here that winapi and X11 have Atom functions. There is
probably something equivalent for Carbon on Mac OS X, you just need to
search Apple docs.
This is a case similar to TTrayIcon, because both components need a
separete implementation based on the OS, and not really per widgetset.
I mean, let's say you use gtk on windows, you will still want to
implement Atom function using the windows api, because x11 isn't
available there. (suposing gtk doesn't have atom functions)