Hi all,

There's an ancient PalmSource internal convention that reserves the resource ID range 31000 - 31999 for shared libraries. This doesn't solve the problem of two shared libraries being opened at the same time, but it would seem to solve the problem being discussed here.

A different approach I've used in some of my shared libraries is to track the open state of my PRC using globals. Then I have an internal DmGetResource equivalent that makes sure the PRC is open before loading a resource. All of my top-level routines call a standard exit routine to clean up, and this in turn makes sure the shared library PRC is closed if it's been opened. There are some additional cases (like making sure the PRC is opened before calling FrmAlert), but most cases it works well.

-- Ken


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Matthew
Darkstorm Bevan
Sent: Monday, September 22, 2003 1:09 PM
To: Palm Developer Forum
Subject: Re: Shared libraries with resources : is it possible?


Be careful with the above 9000 space. PilRC's default auto ID
generation
code starts at 9999 and counts down. With PilRC 2.9p10-CW and later,
you
can use "RESETAUTOID" to change the range of auto ID's generated by
the
tool. For small apps, this may not be an issue, but I'd probably stay
away
from 9500 and higher.


--
Ken Krugler
<http://www.krugler.org>
+1 530-265-2225

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

Reply via email to