In article <[EMAIL PROTECTED]>, Alexandre Luz Barreto wrote:
> I have a program that works fine on devices with palmos 4.1 and  early
> but on OS 5.2 i get a invalid ptr error
> whats wrong?
> 
> ULong romVersion;
> char *PalmOS = NULL;
> 
> FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
> StrIToH(PalmOS,romVersion);
> 
> 

You have to allocate memory for the result string, which you obviously
do not (char *PalmOS = NULL). StrIToH is now trying to write to address 0 
which is a big NoNo. So invalid ptr is correct. You are overwriting low 
memory on Palmos 4.x devices, which is a *bad* thing.

HTH

Ton van Overbeek

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

Reply via email to