locked
Getting own Phone Number using C# RRS feed

  • Question

  • Hi,

    Is there a way to get the Phone Number of my pocket pc device without having to use c++.  I would really like retrieve this information using C#. 

    Any help would be greatly appreciated.

    Regards,

    Jesse

    Saturday, September 16, 2006 10:35 AM

Answers

All replies

  • Hi,

    Apparently my searching abilities are not up to snuff. 

    I found this:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfphoneapi.asp

    Arg....

    Saturday, September 16, 2006 11:36 AM
  • Hi JesseD70,

    You can't get the phone number from the device, whatever its type was, for a simple reason, that the mobile phone number is not stored on the SIM Card.

    SIM Card holds contacts, SMSs, and network information along with an ID to link this SIM card to the User phone number.

    so, don't try u will not get it from the SIM, but if it was stored manually in the device anyway else, you can get it then.

     

    Regards,
    if this post was helpful, please press "Yes".


    Ahmed H. Waly

    • Proposed as answer by Nir Oz Wednesday, July 29, 2009 10:37 PM
    Sunday, September 17, 2006 8:07 AM
  • Hi Jesse

    The OpenNETCF.org Smart Device Framework provides managed wrapper for the native API SimReadPhonebookEntry.
    The SDF is available here: www.opennetcf.org

    Michael

    Sunday, September 17, 2006 3:12 PM
  • Hi Micheal,

    Opennetcf.org wrapper is used for accessing the SIM card data, but it still can't get the own phone number from the SIM

    it is not saved on it!

     

    Regards,

    Ahmed H. Waly

    Monday, September 18, 2006 3:16 PM
  • PC Phone
    Tuesday, October 3, 2006 9:00 AM
  • I was able to pull my cell number off of my SIM card as follows using the opennetCF phone library.  I am not sure if this is unique to my provider but it works with the SIM cards provided to our company.

    OpenNETCF.Phone.Sim.Sim sim = new OpenNETCF.Phone.Sim.Sim();
    string strMyNumber = sim.OwnNumbers[0].Address;
    Tuesday, October 17, 2006 9:19 PM
  • I was able to pull my cell number off of my SIM card as follows using the opennetCF phone library.  I am not sure if this is unique to my provider but it works with the SIM cards provided to our company.

    OpenNETCF.Phone.Sim.Sim sim = new OpenNETCF.Phone.Sim.Sim();
    string strMyNumber = sim.OwnNumbers[0].Address;

     

    I tried it on my phone but it doesn't work if user did not define any own numbers.

    Thursday, April 22, 2010 11:07 AM