> Is it possible to change a global data (like an array) that is compiled in
> to a .PRC file without re-compiling the program with CodeWarrior?
> Suppose that we have a program that is dependent on data that could be
> re-defined by user, how can user supply the program with new data without
> CodeWarrior, I remember that if I compiled a program having a global array
> with Borland C 3.1 I was able to see the same data that is used to
> initialize the array somewhere in the out put EXE file
>
> for example the following definition :
>
> static unsigned char data[10] = {1,2,3,4,5,6,7,8,9,0};
>
> will result numbers 1-0 to be placed in to EXE keeping the same sequence
> but I can not find that sequence in a PRC file when I use the same array
> definition
maybe it was optimized out of the binary? anyhow, what you should do is
store the data within a resource (ie: xxxx0000.bin) and then use the
resource management system to obtain, lock and use the data stored.
ie:
memHandle = DmGetResource('xxxx', 0);
if (memHandle != NULL)
data = (unsigned char *)MemHandleLock(memHandle);
you can use post-processing tools like par or prc2bin and build-prc
to rip apart and re-construct a binary :) we have our own little tool
on our website for generation of unique binaries for each user that
purchases our products :)
---
Aaron Ardiri
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/