Trick:Make use of HAL class(Symbian)

来源:互联网 发布:mac版本pp助手 编辑:程序博客网 时间:2024/05/22 11:59
This class is used to get and set miscellaneous device-specific information and state,eg machine id,avaible runtime RAM etc
If we want to distinguish whether the current handset is P900 or P800,use 
 
 TInt MachineUid = 0;
 HAL::Get(HALData::EMachineUid, MachineUid);

then distinguish using MachineUid.

P800: 0x101F408B
P900: 0x101FB2AE
P910: 0x10200AC6
Notes:You have to link with hal.lib.

For more depth,drill into header files:HAL.h and HAL_data.h