.NET Components for Mobility

NullReferenceException on new SmsMessage()

Last post 09-17-2008 8:46 AM by paulG. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-16-2008 12:23 PM

    • paulG
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 2

    NullReferenceException on new SmsMessage()

    Hi,

    I've got a windows mobile 2003SE PPC and i'm trying to use  InTheHand.WindowsMobile.PocketOutlook to send sms.

    using :

    SmsMessage sms;
    sms=new SmsMessage();
    sms.Body = "test d'envoi de sms";
    sms.To.Add(new Recipient("00000000"));
    sms.Send();

     

    But on the second line I've got a "NullReferenceException" (on new SmsMessage). I tried an other code to get my mail :

    OutlookSession session = new OutlookSession();
     foreach (SmsMessage msg in session.SmsAccount.Inbox)
    {
           MessageBox.Show(msg.Body);

     

    But then I've got a NullReferenceException on session.SmsAccount.

    Isn't Windows mobile 2003 sufficient to use this DLL ? Is there a solution to my problem ?

    Thanks in advance

     

    Paul

  • 09-17-2008 7:36 AM In reply to

    Re: NullReferenceException on new SmsMessage()

    What specific device are you using? Is it definitely a Phone Edition device?

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 09-17-2008 8:46 AM In reply to

    • paulG
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 2

    Re: NullReferenceException on new SmsMessage()

     Hi,

    I'm using a Psion Teklogix - WorAbout Pro

    I'm sure it can send SMS but I'm not sure it is a Phone Edition device, how can I know ? If it is not, is there any way to send sms ?

     

    Thanks in advance,

     

    Paul

Page 1 of 1 (3 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.