detect IMEI number

Posted on 2006-11-17
Last Modified: 2013-11-18
i need to find the imei number proramatically, possible? if so how? I'm using VS 2005 and VB
Question by:str_kani
  • 2
LVL 12

Author Comment

ID: 17967512
windows 2003 mobile.

Accepted Solution

CraigTheGeek earned 500 total points
ID: 17979826
LVL 12

Author Comment

ID: 18067551
here is the working code...

Dim t As New OpenNETCF.Tapi.Tapi

            Dim l As OpenNETCF.Tapi.Line = t.CreateLine(0, OpenNETCF.Tapi.LINEMEDIAMODE.INTERACTIVEVOICE,


            Dim lgi As New GeneralInfo

            Dim buffer(512) As Byte
            'write size
            BitConverter.GetBytes(512).CopyTo(buffer, 0)

            If lineGetGeneralInfo(l.hLine, buffer) <> 0 Then
                Throw New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error(), "TAPI

Error: " + System.Runtime.InteropServices.Marshal.GetLastWin32Error().ToString("X"))
            End If

            Dim serialsize As Integer = BitConverter.ToInt32(buffer, 36)
            Dim serialoffset As Integer = BitConverter.ToInt32(buffer, 40)
            lgi.SerialNumber = System.Text.Encoding.Unicode.GetString(buffer, serialoffset, serialsize)
            lgi.SerialNumber = lgi.SerialNumber.Substring(0, lgi.SerialNumber.IndexOf(Chr(0)))

            ' Dim gi As GeneralInfo = GetGeneralInfo(l)
            'lblManufacturer.Text = gi.Manufacturer
            'lblModel.Text = gi.Model
            ' lblRevision.Text = gi.Revision
            ' lblSubscriber.Text = gi.SubscriberNumber
            Return lgi.SerialNumber


Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Samsung Galaxy Ace Emails not visible in Inbox 2 80
ActionBar problem 7 144
TextBelt send file contents 20 118
How do i get a video to play smoothly on a mobile phone? 5 69
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question