none
Get device information with native code

    Question

  • Hi everyone,

    I have developed an application using cpp that is targetting many devices like palm, samsung and motorola. But now I want to know, on which device it is being installed, for example samsung blackjack or palm treo 750v.. and based on that I want to separate some of its features. Simply os version or screensize will not satisfy my need.. Is there a way to get all device information in native code.. pls help.. I am working on a live project, so its urgent.

    Thanks in advance.
    Friday, January 29, 2010 12:31 PM

Answers

  • Also note that the same phone may identify itself in different ways in different markets. For example, the HTC Touch Pro II identifies itseld as the "Rhodium" for the unit sold under T-Mobile USA. It usually is not a good idea to base the behaviour and layout of your program on device model. You'd be better off trying to query for the capabilities of the device. It iwll help insulate you from minor differences in device ID and may better future-proof your application.
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.
    Friday, January 29, 2010 5:41 PM

All replies

  • Yes, you can.

    Sort of.

    You can use IOCTL_HAL_GET_DEVICEID to request the device id.

    http://msdn.microsoft.com/en-us/library/ms904438.aspx

    BUT: This is something that OEMs are supposed to provide and not all of them do!

    If you want the CPU type, you can this much more consistantly as the ARM chips have a CPUID on Co-Processor 15. (You need asm to do thei btw)

    HTH

    -Zak
    Friday, January 29, 2010 1:19 PM
  • Also note that the same phone may identify itself in different ways in different markets. For example, the HTC Touch Pro II identifies itseld as the "Rhodium" for the unit sold under T-Mobile USA. It usually is not a good idea to base the behaviour and layout of your program on device model. You'd be better off trying to query for the capabilities of the device. It iwll help insulate you from minor differences in device ID and may better future-proof your application.
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.
    Friday, January 29, 2010 5:41 PM
  • Thanks guys for your reply,

     I have another solution on my mind. Can i somehow get the keyboard layout of the device ? Say, in Moto Q, backspace key is not present, so delete functionality is achieved through escape key.
    So, i have to write the code for delete functionality on backspace for Moto q, and on escape key for Samsung Jack.
    For that, i would need to know if backspace key is present or not..
    I hope you got my question. I want to know a particular key is present or not on the keyboard, without any key event.

    Thanks in advance.
    Monday, February 01, 2010 2:01 PM