Ben,
Ok, every little bit helps. You'd think I could take it from here but I have a problem. I get the handle to the code resource, I can lock the handle thus telling me where the code segment starts but the functions MemHandleSize and MemPtrSize both blow up if I try to use them. Now is there some other "standard routine" I should be using to get the size of this resource record???


Ben Combee wrote:

At 03:41 PM 11/12/2003, Randy Eaton wrote:

Ben,

You are correct, the startup code does load the code segment(s) and fix up the addresses. But it's all done with local variables. The key to the information seems to be the SysAppInfoPtr which is filled out by a call to SysAppStartup.

The SysAppInfoPtr is local to the startup routine however. Do you know if there is some way to ask for that pointer from some other Sys routine OR if it is in fact safe to call SysAppStart() again from my pilotMain() (this doesn't seem smart but I'm not sure what it does).


You don't need that info. Just open your app's database, get resources code 1..code n, and lock each resource. Since they are already locked, you won't change their address, and you can then use standard calls to find their location and size. You can determine the global variable range by checking A5 and reading the high/low values out of the data 0 resource.



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

Reply via email to