+ Reply to Thread
Results 1 to 8 of 8

[SDK] Get M8 IMEI

This is a discussion on [SDK] Get M8 IMEI within the Modding & Development forums, part of the Meizu M8 category; Hi. Somebody can tell me how get phone IMEI with using meizu SDK? I am found function "Dial_GetImeiSerialNumber2()" in the ...

  1. #1
    Passing By
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [SDK] Get M8 IMEI

    Hi. Somebody can tell me how get phone IMEI with using meizu SDK? I am found function "Dial_GetImeiSerialNumber2()" in the "CallNotifyApi.h", but i not understand parameters. How use this function? Help me)

    Function:

    CALL_DLLPORT_GPRS HRESULT Dial_GetImeiSerialNumber2(HWND hMainWnd,TCHAR *lpszImeiSerialNumber,DWORD dwLength,TCHAR *lpszDeviceSerialNumber,DWORD dwLength2);

  2. #2
    Junior Member
    Join Date
    Jan 2010
    Location
    Adelaide, South Australia - Australia
    Posts
    65
    Thanks
    17
    Thanked 2 Times in 2 Posts
    on your keypad press *#06# that will give you our IMEI - its a universal code for every mobile phone
    FW: 0.9.8.22 Offical
    MMS & GPRS work

  3. #3
    Valued Member
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    1,309
    Thanks
    249
    Thanked 200 Times in 145 Posts
    i dont think THAT is what he wanted to know
    he wants to read the IMEI from inside a program so he cant just press 'settings' -> 'about' and read it...

    Sorry, i dont know how to do that eighter. but maybe it is somewhere in the Registry?
    Meizu M8 SE - FW 0.9.9.18 (dao89 n450) Dualboot LBE A11 Android 2.2

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Location
    Adelaide, South Australia - Australia
    Posts
    65
    Thanks
    17
    Thanked 2 Times in 2 Posts
    oh sorry my mistake
    FW: 0.9.8.22 Offical
    MMS & GPRS work

  5. #5
    Moderator
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    1,723
    Thanks
    96
    Thanked 358 Times in 141 Posts
    hMainWnd a windowhandler so give yourMainWindow.m_hWnd to the function

    lpszImeiSerialNumber is a charpointer = outputstring for the imei

    dwLength is the string-length for imei

    lpszDeviceSerialNumber is a charpointer = outputstring for the serialnumber

    dwLength2 is the string-length for the serialnumber

    not tested
    [Meizu M8 - FAQ] [Meizu M9 Tips and Tricks]

    No Support over PM. Please use the Forum.

  6. #6
    Passing By
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am tested this function, but it doesn't work (
    Code:
      TCHAR *pIMEI, *hz1;    
      DWORD imeiLength, hz2;
      CMzString it = L"";
    
     pIMEI = NULL;
     hz1 = NULL;
     imeiLength = 0;
     hz2 = 0;
    
    					
    			
    	Dial_GetImeiSerialNumber2(m_hWnd, pIMEI ,imeiLength, hz1 ,hz2);
    			
    	wsprintf(it, L"%d", pIMEI);
    	MzMessageBoxEx(m_hWnd, it, L"IMEI",MB_OK);
    MessageBox shows me 0.

  7. #7
    Moderator
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    1,723
    Thanks
    96
    Thanked 358 Times in 141 Posts
    try this

    Code:
     TCHAR pIMEI[20] = {0};
     TCHAR hz1[20] = {0};    
     DWORD imeiLength = 20;
     DWORD hz2 = 20;
     CMzString it(20);
                    
                
     Dial_GetImeiSerialNumber2(m_hWnd, pIMEI ,imeiLength, hz1 ,hz2);
                
     wsprintf(it, L"%s", pIMEI);
     MzMessageBoxEx(m_hWnd, it, L"IMEI",MB_OK);

    important is the %s!
    pIMEI is a string and no decimal

    the 0 is the
    pIMEI-NULL-pointer

    this version works for me

    Last edited by crimson05; 05-08-2010 at 05:28 PM.
    [Meizu M8 - FAQ] [Meizu M9 Tips and Tricks]

    No Support over PM. Please use the Forum.

  8. #8
    Passing By
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by crimson05 View Post
    try this

    Code:
     TCHAR pIMEI[20] = {0};
     TCHAR hz1[20] = {0};    
     DWORD imeiLength = 20;
     DWORD hz2 = 20;
     CMzString it(20);
                    
                
     Dial_GetImeiSerialNumber2(m_hWnd, pIMEI ,imeiLength, hz1 ,hz2);
                
     wsprintf(it, L"%s", pIMEI);
     MzMessageBoxEx(m_hWnd, it, L"IMEI",MB_OK);

    important is the %s!
    pIMEI is a string and no decimal

    the 0 is the
    pIMEI-NULL-pointer

    this version works for me

    Thanks! %s is right.


 

Similar Threads

  1. Stolen and lost Meizu M8 IMEI
    By Err0r in forum General Meizu M8
    Replies: 19
    Last Post: 10-27-2010, 02:57 PM
  2. Meizu M8 et numéro IMEI
    By sosoos in forum French
    Replies: 0
    Last Post: 05-20-2009, 10:10 PM
  3. IMEI, Serial Number and Firmware ......
    By mattcoq in forum General Meizu M8
    Replies: 2
    Last Post: 04-17-2009, 08:35 AM