Stuart,

>       You should check out the limited source release for OS 4 from
>PalmSource.  

The problem is/was that I was looking at my copy of the 3.5 source and docs,
where SysLibInstall is not officially documented as an API, but is listed in
Appendix A as System Use Only.

Interestingly, I've since learned the OS5 API docs now include SysLibInstall and
include a comment saying that although typically used by the OS, it can be used
by applications which need to do their own install.  Curiously, OS5 still lists
it in Appendix A as well.  Hopefully this is an oversight since it is now
officially documented.

>One time you may want to use this is if you have your shared library's code
>resource stored in a PRC with a type other than 'libr' and/or an id other than
>0.  

Yes, that is the exact reason I was asking the question.  In the past I've used
DmCreateDatabaseFromImage to extract embedded libraries, or been able to use a
single library at a time without extraction by inserting the 'libr' resource
with an ID of zero.  This will SysLibLoad and run even though it is a resource
in a regular 'appl' type application.  However, this only works with the
resource ID expected by SysLibLoad, ie 'libr' number zero.

One of the objectives was to accomplish the same end with multiple libraries,
which would require using ID's other than zero (and/or a different type).

>If you want an example check out my AES library at:

Actually, that code is what prompted me to ask the question!  I just learned
yesterday of your new update, and saw you were using SysLibInstall to accomplish
this feat.  Since my (outdated) docs showed it as system use only, I was looking
for a second opinion from the experts on this forum...

Incidentally, maybe I just didn't look close enough, but in your routine it
appears you increment the database protection count to safeguard the code
resource, but I don't see where you decrement the count if you unload the
library.

Thanks Stuart.

Doug

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

Reply via email to