Background
SMS or Simple Messaging Service is a means of sending a short message (160 characters max) to another SMS capable device via the GSM network. On Pocket PC Phone edition devices and Windows CE Smart phones, when selecting a folder, there should have been at least an ActiveSync and SMS message store and possibly an MMS message store as well.
These message stores hold messages from different transport providers locally on the device.
For the purposes of this article, we will be concentrating on the SMS message store as we want to use this to send a message.
Using the code
To make the code simpler and easier to understand, the bulk of the code uses MFC for the User Interface and ATL for smart pointer support.
If people request it, I may make a Win32 only version available as the relevant code (i.e., not the UI code) only requires ATL and not MFC.
In this article, I am not going through a listing of the creation of the MAPI session and opening of the SMS message store and outbox folder. The code is well commented and provided in the source zip file in the two functions GetSMSMsgStore and GetSMSFolder which get the relevant SMS message store and the SMS drafts folder.
Note: If you have not got a Pocket PC Phone Edition or Windows CE SmartPhone device, sorry this article will not be useful.
Fullnotes: codeproject.com