While trying to debug a device serial number issue I went to the length
of debugging on two separate devices a section of code which retrieves
the serial number.  The devices were a Vx and a IIIc and the serial
numbers seemed to be the same.

Here's the section of code (the code following this is not included - I
stopped at the 'get rom token' line and examined the memory there).

extern Boolean GetDeviceSerialNo (Char *dataP)
{
Err    err;
UInt16   bufLen;


  // clear the string first
   MemSet (dataP, 15, 0);

  // get the ROM token
   err = SysGetROMToken (0, sysROMTokenSnum,  (UInt8**) dataP, &bufLen);




The memory from the dataP location for at least 12 characters is
identical.  The bufLen variable is returned as 12, which I think is
right.  Examining the memory should overcome any NULL values returned in
the string.

Also, checking the 'Version' area in the built in launcher reports two
different serial number for these units?

Any pointers on what I've done wrong would be appreciated!


-Darren Beck
http://www.codecity.net


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

Reply via email to