I was tackling with the same issue some time back and here is the complete
solution....
--------------------------
// Treo 600 related code names
#define Treo600ComID 'hspr'
#define Treo600DevID 'H101'
#define Treo600ComIDSim 'hspr'
#define Treo600DevIDSim 'H201'
if(Treo600Test())
{ //Execute this function only on Treo 600 devices
char temp[15];
MemSet(temp ,15,0);
HsGetVersionString(hsVerStrSerialNo, temp, &bufLen);
PalmUniqueNumber = MemPtrNew(15+1);
StrCopy(PalmUniqueNumber, temp);
}
static Boolean Treo600Test()
{
UInt32 companyID;
UInt32 deviceID;
FtrGet(sysFtrCreator, sysFtrNumOEMCompanyID, &companyID);
FtrGet(sysFtrCreator, sysFtrNumOEMDeviceID, &deviceID);
return (((companyID == Treo600ComID) && (deviceID == Treo600DevID))
|| ((companyID == Treo600ComIDSim) && (deviceID == Treo600DevIDSim)));
}
--------------------------
Regards,
Manpreet Singh
Drish InfoTech
> This function looks like Handspring-specific function (HsXXXX). So, when I
am writing code that runs on all Palm devices, what checks should I perform
before calling this function.
>
> For example:
>
> if (this_device_is_hs_device)
> {
> HsGetVersionString(hsVerStrSerialNo, versionStr, NULL);
> }
> else
> {
> SysGetROMToken(....);
> }
>
> What should the "this_device_is_hs_device" check be. Do let me know.
>
> Thanks & Regards
> Anand Sinha
>
> ==============
> Hi Sinha,
> You can use this:
>
> #define hsVersionStringSize 32
> char versionStr[ hsVersionStringSize ];
> HsGetVersionString(hsVerStrSerialNo, versionStr, NULL);
>
> You'll have to include the headers from the palmOne SDK, though.
>
> Hope this helps!
>
> -Jon
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/