Josh,
At 10:30 PM 3/31/99 -0800, you wrote:
>Maybe I'm just not getting it, or I'm having one major brain spasm (not
>unlikely) but what are the sleep and wake entry points, or better yet where
>are they documented.
Good question. The bad news is that they're not.
A shared library allows you to make use of the system trap dispatch
mechanism. This is the thing that allows you to call PalmOS functions (it
uses those SYS_TRAP macros that come after every API declaration).
Basically, a shared library provides the glue from a set of custom trap
identifiers (which you declare in your shared library's header file) to a
set of function calls (which you define in your library). Of these
functions, there are four that must be declared for every shared library:
Open, Close, Sleep and Wake.
Open allocates whatever library-specific resources are required by your
library.
Close releases these resources.
Sleep handles a system interrupt that the device is powering down. This
allows you to power down any devices that your library may manage.
Wake handles a system interrupt that the device is powering up. This
allows you to turn the power back on.
Where I imagine you may run into some problems is that you Sleep and
Wake.functions must call interrupt-safe functions, since they are
effectively interrupt handlers. They should also be pretty fast.
There is a white paper on shared libraries and a sample on the Palm web site.
Hope this helps.
Regards,
Greg
Greg Winton
Bachmann Software and Services, LLC
mailto:[EMAIL PROTECTED]
http://www.bachmannsoftware.com
Software Development for Handheld & Mobile Computing, Windows and the Internet
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm Computing Platform