From:http://www.sf.org.cn/Article/symbiandev/200609/19040.html
所有的Series60设备都拥有一个由制造商分配的唯一标识符-机器UID;因此可以通过这一UID信息来获取手机型号;本文就介绍了这种方法.
常见的S60机型及其机器UID:
S60 1st Edition (0.9):
Nokia 7650 0x101F4FC3
S60 1st Edition, FP1 (1.2):
Nokia 3650 0x101F466A
Nokia 3660 0x101F466A
Sendo-X 0x101FA031
Siemens SX-1 0x101F9071
S60 2nd Edition:
Nokia 6600 0x101FB3DD
S60 2nd Edition, FP1:
Nokia 3230 0x10200F97
Nokia 6260 0x101FB3F4
Nokia 6620 0x101F3EE3
Nokia 6670 0x101FB3F3
Nokia 7610 0x101FB3F3
S60 2nd Edition, FP2:
Nokia 6630 0x101FBB55
Nokia 6680 0x10200F99
Nokia 6681 0x10200F9C
Nokia 6682 0x10200F9B
S60 2nd Edition, FP3:
Nokia N70 0x10200F9A
Nokia N90 0x10200F98
other
Nokia N-Gage? 0x101F8C19
Nokia N-Gage? QD 0x101FB2B1
因此可通过以下代码获取手机型号:
void GetPhoneModeL(TDes& /*aModeBuf*/)
{
TInt machineUid=0;
HAL::Get(HALData::EMachineUid, machineUid);
switch(machineUid)
{
case 0x101F9071:
{
//Siemens SX1
break;
}
case 0x101F466A:
{
//Nokia 3650
break;
}
case 0x101F4FC3:
{
//Nokia 7650
break;
}
case 0x101FB3DD:
{
//Nokia 6600
break;
}
.....................
}
//需要在头文件中include<hal.h>;在mmp文件中加上hal.lib