At 10:26 AM -0300 2001/06/19, Rania Saymeh wrote:
>I'm trying to retreive the ROM serial number of Symbol using the same
>function that works with the Palm IIIx but it gives me a fatal error...is
>there a different function other than SysGetRomToken that's specific to
>Symbols?
>thanx
>
>error = SysGetROMToken(0, sysROMTokenSnum, (Byte**)&pBuf, &bufLen);
> if((!error) && (pBuf) && ((Byte)pBuf[0] != 0xFF)){
> pBuf[bufLen] = 0;
Can't do that. pBuf points to ROM.
> setFieldText(gpActiveForm, SettingsPalmIdField, pBuf);
> } else {
> setFieldText(gpActiveForm, SettingsPalmIdField, "(none)");
> }
SysGetROMToken returns a pointer to the location of the serial number in ROM. It does
not copy bytes from the ROM location to your own RAM buffer. The serial number is not
a C string, so you have the right idea ending the string with a zero byte when using
it with string routines, but, you need to copy it from ROM into an allocated text
handle for this to work.
In case you haven't already done so, review the example code in the knowledgebase for
more information: http://oasis.palm.com/dev/kb/manuals/1780.cfm
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/