views:

500

answers:

4

Hi! I have googled and searched after this topic, but could not find any good answer.

How can i get the imei for the phone, or at least a unique id. I am also interested in finding the phonenumber through the simcard. Right now im using the systemstate to get the owner's phonenumber, but that is only set if the owner has set it himself :/

Hope somebody can help

thanks in advance

A: 

See this earlier question:

http://stackoverflow.com/questions/1119574/unique-machine-id-for-a-windows-ce-device

As far as I can tell, what you want to do is not really possible on a Windows Mobile device. I think a simple alternative (which may or may not work, depending on your purposes) is to write a random GUID into the device's Registry somewhere the first time your application is run, and then use that to uniquely identify the device.

MusiGenesis
+2  A: 

There is this EXE to retrieve the IMSI if that helps you.
And I found a GetDeviceUniqueID function on the Mobile Team Blog (link), should give you a unique ID according to what they said (skimmed through the article)

Shaihi
Thanks... i'll look into that
+2  A: 

If you really need the IMEI, have a look at this blog:

http://dotnetslackers.com/Community/blogs/ruslantrifonov/archive/2007/07/10/_2200_How-To_2200_-Series_3A00_-Retrieving-IMSI-and-IMEI-on-Windows-Mobile.aspx

it contains a download which demonstrates using lineGetGeneralInfo via TAPI to retrieve IMEI & IMSI.

Matt Lacey
Thank you... i'll look into that
A: 

The IMEI and IMSI via TAPI thing doesn't always work on newer devices due to security restrictions. The device UniqueId calls were not required to be working until I think 6.1. Some OEMs did not implement.