At 11:15 AM -0700 2001/09/14, Praveen Potineni wrote:
> FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
>
> if(romVersion > 0x02900000)
> {
> retval = SysGetROMToken(0, sysROMTokenSnum, (UInt8**) &buffer,
>&bufLen);
>
> StrNCopy(pilotid, buffer, 12);
What if there is no serial number? You don't check buffer for NULL. That's probably
why StrNCopy is complaining.
> pilotid[12]=0;
Also don't assume serial numbers are 12 bytes long. Use bufLen. You should also check
the KnowledgeBase for sample code on the correct way of accessing/using ROM token
serial numbers... your code is very incomplete.
Regards,
Jim Schram
Palm Incorporated
Partner Engineering
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/