Chapter 8. Shared Libraries

In this chapter, we look at extending an application’s functionality through the use of shared libraries. A shared library is a unit of reusable code that typically contains a small, but often used, set of functionality. Instead of compiling the same code into every application, a shared library can be loaded and used by other programs as necessary.

We show you how to develop a shared library for the Palm that can be used by a conventional Palm application. Next, we integrate our shared library into an AppForge fuser. A fuser is a Palm application with modifications to enable marshaling data between it and an AppForge application. The fuser provides a bridge between your AppForge application and Palm applications or libraries. Depending on the needs of your application, a fuser can contain substantial functionality of its own.

We assume you are familiar with writing conventional C/C++ applications for the Palm Pilot using the Metrowerks CodeWarrior development environment for Windows. We also assume you are familiar with writing AppForge applications and fusers. We covered fuser development in Chapter 7.

Memory Concepts

Before diving into the shared library model, it is important to understand how shared library memory differs from memory in a conventional Palm application. One significant difference between Palm applications and shared libraries is that libraries do not have global variables. Since global variables only make sense to the current application, ...

Get Programming Visual Basic for the Palm OS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.