Because of the need to urge the phone in the short message (SMS) to operate, off-the-shelf APIs are not easy to implement, see the best use to count Inthehand This third party control, really convenient, but this version is a commercial version ($49), the release of the trial version does not support this class, enough depressing.
In fact, the main thing is to use Smsmessagefolder this class, hey, is there any good way to replace it? Why does Microsoft not provide APIs to operate SMS? Perhaps in the next version will provide it, I hope!!
Post section using the code of the Smsmessagefolder class, the following display is the backup and then delete the function, really convenient!!
Ps:inthehand The path of this website accidentally I burst out:
Fatal error:maximum execution time for seconds exceeded in
C:inetpubwwwrootinthehand orumsincludes emplate . PHP (127): eval () ' D code on line
using System;
using System.Collections.Generic;
using System.Text;
US ING System.IO;
using InTheHand.WindowsMobile.PocketOutlook;
Namespace Dumpsms
... {
Class program
... {
Private Const string file_name = "Sms.txt";
static void Main (string[] args)
... {
if (! File.exists (file_name))
... {
OutlookSession outsess = new OutlookSession ();
Smsmessagefolder smsflr = OutSess.SmsAccount.Inbox;
if (Smsflr.count > 0)
... {
///Only Save the ' the ' the ' the ' the ' the ' the ' smsmessage smsmsg = smsflr[0];
found
if (SmsMsg.Body.Length > 0)
... {
StreamWriter writestream = File.createtext (file_name);
WRITESTREAM.WRiteline (Smsmsg.body);
Writestream.close ();
}
Smsmsg.delete ();
}
}
}
}
}