Hi

I've written an application that retrieves the S/N from the ROM on a treo using 
the call:

error = ::HsGetVersionString( hsVerStrSerialNo, m_deviceSerialNumber, 
&serialLength );

There doesn't appear to be an error, but m_deviceSerialNumber is blank. So far 
this has only happened on a very small percentage of Treo 600 devices - these 
devices still report a serial number in the Phone Info application.

Now, I only make this call if the following condition is true:

if ( errNone == ::SysLibFind( phnLibGSMName, &libRef ) || errNone == 
::SysLibFind( phnLibCDMAName, &libRef ) || errNone == ::SysLibLoad( 
phnLibDbType, phnLibGSMDbCreator, &libRef ) || errNone == ::SysLibLoad( 
phnLibDbType, phnLibCDMADbCreator, &libRef ) )

(i.e. "is this device a smartphone?")

Otherwise I call SysGetROMToken with the sysROMTokenSnum token.

1. Am I correct to use HsGetVersionString, or is there another way?
2. Will all handspring devices respond to the "is this device a smartphone?" 
condition, or am I best off just using a call say:

if (!FtrGet (hsFtrCreator, hsFtrIDVersion, &value))

(i.e. "is this a handspring device?" )

I've also been told that I can use SysGetROMToken with the token 'hspr' rather 
than 'snum', but I looked in SystemMgr.h and 'hspr' is defined also as:

sysNotifyHSIPeripheralRespondedEvent.

And, I've also been told I can use HsAttrGet, but the SDK API docs for this 
function (and the header) states it requires a HsAttrEnum attribute, but none 
of the attributes in the enum mention anything about serial numbers. The enum 
HsVerStrEnum does have hsVerStrSerialNo however.

Please can someone help me out with the problem; I need to know what I'm doing 
wrong and your help is really much appreciated.

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

Reply via email to