Getting IMEI Number

I

Indra Bisen

Hi,
How can we get the IMEI number of a PDA using .net compact framework ?

Indra Bisen
 
G

Guest

Hi, i use TAPI wrapper! download on
http://www.alexfeinman.com/download.asp?doc=Tapi1.6.zip

Code example to retrieve IMEI:

--------------------------------------------------------
using Opennetcf.tapi;

Line line;
Tapi tapi;

int ret = 0;

tapi = new Tapi();
tapi.Initialize();
line = tapi.CreateLine(0, LINEMEDIAMODE.DATAMODEM,
OpenNETCF.Tapi.LINECALLPRIVILEGE.OWNER |
OpenNETCF.Tapi.LINECALLPRIVILEGE.MONITOR);

LINEOPERATOR lop = new LINEOPERATOR();
byte[] data = new byte[lop.SizeOf];
ret = CellTSP.lineGetCurrentOperator(line.hLine, data);
ByteCopy.ByteArrayToStruct(data, lop);
OpenNETCF.Tapi.LINEGENERALINFO lgi =
new OpenNETCF.Tapi.LINEGENERALINFO(1024);
lgi.Store();
ret = CellTSP.lineGetGeneralInfo(line.hLine, lgi.Data);
lgi.Load();

return lgi.SerialNumber.Substring(0, 15); <--- IMEI
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top