At 11:09 AM -0700 2000/05/17, Ron Nicholson wrote:
>Abhijit Mhetre writes:
>>SysGetRomToken
>>Return from ROM a value specified by token.
>>Prototype Err SysGetROMToken(Word cardNo, DWord token,BytePtr *dataP, WordPtr sizeP )
>
>Isn't this a trap that can be patched to return any value the user
>desires?
Yes. And that's true of all system APIs.
>Is there any way to check the ROM token directly? If not,
>is there a supported way to check to see if a trap has been patched
>or not?
I suppose you could verify that the address returned is actually in ROM. But that's
not guaranteed to be true forever, and the address itself may vary per device ROM (so
checking the return value against a hard-coded value may fail on some devices).
Keep in mind the flash serial number is not (and was never intended to be) a foolproof
mechanism of unique device detection. It is merely a convenient, short, reasonably
unique optional identifier of the device. Future devices as well as devices from our
licensees may one day use a different mechanism.
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/