tut.by,

P>> How to find the Company ID &Device ID of Tungsten & Zire Devices. 

T>Err err = SysGetROMToken( 0, sysROMTokenSnum, ( UInt8 ** )&serialnum, &sizeP
T>if( err == errNone )
T>    MemMove( &ROMNumber[0],(UInt8*)serialnum,(UInt16)sizeP);

First, this doesn't answer the question asked, which is for the company and
device IDs.  Here is how you'd get those:

FtrGet(sysFtrCreator, sysFtrNumOEMCompanyID, &companyID);
FtrGet(sysFtrCreator, sysFtrNumOEMDeviceID, &deviceID);

Compare to the following matrix:

Product         Dev ID  Company ID

Tungsten|T      'Frg1'  'Palm'
Tungsten|T2     'Frg2'  'Palm'
Tungsten|W      'atcl'          'palm'
Tungsten|C      'MT64'  'palm'
Zire 71         'Zpth'  'Palm'
Zire                    'Cubs'  'Palm'
Zire 21         'Zi21'  'Palm'
Tungsten|E      'Cct1'  'Palm'
Tungsten|T3     'Arz1'  'Palm'
Zire31          'Zi22'  'Palm'
Zire72          'Zi72'  'Palm'

I don't know the device ID of the T5.

Second, the code you posted is not failsafe.  You must not only check the return
code of SysGetROMToken(), but you must also check the returned buffer pointer is
not NULL, or that the first byte of the buffer is not 0xFF.

Sample code for that, and computing the checksum, is in the SDK Programmer's
Companion.  See
http://www.palmos.com/dev/support/docs/palmos/SystemFeatures.html#1046593

Doug

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

Reply via email to