> I am writing a shared library and would like it to display a custom alert.
> I need to provide an alert resource to FrmCustomAlert, but shared
libraries
> may not contain resources as far as I understand.

They can contain resources, but the database isn't opened and closed
automatically, so you have to do this yourself.

> I looked at the HostTransfer example in the 4.0 SDK, which shows how to
> combine an app and a shared library into the same database, but it seems
to
> rely on SysLibInstall, a function marked as "System-Use Only."  (?)

HostTransfer opens and closes its database several places. Search for
DmOpenDatabaseByTypeCreator calls in HostTransferLib.c.

You have some choices to make as to when the shared library's database is
open. At one extreme, you can open and close the database in each function
that needs access to resources. At the other extreme, you can open the
database when your shared library is loaded or opened, and close it when
your shared library is closed. If your shared library's database is left
open after control returns to the calling application (the client), then
your resources can mask the client's resources. You can use the reserved
range of resource IDs for shared libraries, but that doesn't prevent
conflicts with other shared libraries doing the same thing.

Also see the archives for other posts on this subject.
-
Danny @ Palm

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to