You are here:ActiveXperts.com > SMS Messaging Server > How to create a new Message > SMS > Visual C++
SMS Messaging Server is an SMS messaging framework that enables companies to send, receive and process SMS- and e-mail messages. The framework is designed support virtually any scenario where low-and high volume SMS messaging is required. Use SMS Messaging Server in the following scenarios:
SMS Messaging Server can be well integrated into VBScript environments. This document describes how the SMS Messaging Server can be integrated into your own projects.
In this example we are going to create a Visual C++ sample page to create an SMS using the ActiveXperts SMS Messaging Server API. The SMS Messaging Server service will send the message you created in the database.
Download ActiveXperts SMS Messaging Server from the ActiveXperts Download Site and start the installation. The installation guides you through the installation process.
Launch 'Microsoft Visual C++' from the Start menu, and choose 'New' from the 'File Menu'. The 'New' dialog appears.
Select the type of project: 'Win32 Console Application', enter a 'Project name' and select the 'Location':
A new Project is created now.
Before you can use the SMS Messaging Server API, you need to refer to the SMS Messaging Server API library. The actually reference files are shipped with the product and are located in the following directory:
Add this path to your standard include directories (Tools->Options: Directories-tab). This directory includes the following files, necessary to link to the SMS Messaging Server API:
On top of your code, declare the following objects:
You must initialize the COM library before they can call COM library functions (e.g. SMS Messaging Server API functions):
Create a Message Database instance in the following way:
You should not create an instance of a Message yourself; it is returned by functions like Create, FindFirstMessage, FindNextMessage and Load.
The following code will create an empty record in the database:
Here we are going to setup the information of the message.
The following code will save the message in the database. The SMS Messaging Server service will then send this message.
You can download the full source code of this project from the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/sms-messaging-server. There are many other working samples included with the product or on the FTP site.
The SMS Messaging Server project ships with a set of Microsoft Visual Studio .NET samples. The projects are created with Microsoft Visual Studio 2008.
Users with a later version of Microsoft Visual Studio can open such a project. The Visual Studio Conversion Wizard will guide you through the process of converting the project to the version used.