[Cross-posting to codewarrior.palm newsgroup -- grok
http://groups.google.com/groups?q=Linking+of+PRC+&meta=group%3Dcodewarri
or.palm ]

Some time ago, I inquired about how to link in a helper.prc with my main
application using Codewarrior.  The answer:

1) Create MyRezFile.r, which contains this line:
read 'iPRC' (1000) "helper.prc";

2) Add MyRezFile.r to the project, and relink.  You can then get a ptr
to helper.prc by using DmGet1Resource(), and you can pass this to
DmCreateDatabaseFromImage() to actually drop helper.prc onto the device.

My original message is at
http://www.escribe.com/computing/pcpqa/m62131.html

This was working peachy-keen -- my main application, when launched,
could then programmatically 'install' helper.prc... Until helper.prc
grew larger than 64K.  Now, Codewarrior gripes:

PalmRez Warning: Output resource size is greater than ~64K size limit:
'iPRC 1000'

Obviously, a single resource record can't be larger than ~64K.  My
helper.prc is now sitting pretty at 68K.  What to do?  Ideally, I could
use some kind of parameters in my MyRezFile.r, which PalmRez will
interpret to mean 'break it up'.  I have searched in vain to find a
reference for the format that Codewarrior's PalmRez uses -- I only end
up with abstract overviews of MPW, which isn't my bag.  I couldn't even
find how to put a comment into a .r file!  

Anyway I envision something like this:

read 'iPRC' (1000) "helper.prc";

        becomes

read 'iPRC' (1000) 0 61440 "helper.prc";     // 0-60K
read 'iPRC' (1001) 61441 69632 "helper.prc"; // 61-68K

Then, in my code, I simply join together the chunks into one contiguous
piece of memory before I call DmCreateDatabaseFromImage().

Is this possible?  Can someone kindly point me in the right direction?
Or if not, creative solutions are much welcomed.  :)

Thanks!
-Jeff Ishaq



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

Reply via email to