ActiveXperts MMS Toolkit
Manual


© 1999-2007 - ActiveXperts Software B.V.
http://www.activexperts.com
info@activexperts.com




Table of Contents

1. Introduction
2. System Requirements
3. Installation
4. How to use the MMS Toolkit objects
5. Error Codes and Constants
6. MMSSlide Object
7. MMSMessage Object
8. MM1Connection Object
9. MM4Connection Object
10. MM7Connection Object
11. Samples
12. Troubleshooting
13. Purchase and Product Activation
   
 Appendix A: License Agreement



1. Introduction

1.1. What is the ActiveXperts MMS Toolkit?

Adding MMS capabilities to an application is not a simple matter. It requires specialized knowledge that might be outside an individual programmer's expertise. Today, Windows developers rely upon the power, flexibility and reliability of the MMS Toolkit by ActiveXperts Software.

ActiveXperts MMS Toolkit is an ActiveX/COM component, and provides MMS messaging functionality.
With this Toolkit, you can send MMS messages via a:
ActiveXperts MMS Toolkit features the following:

ActiveXperts MMS Toolkit can be used by any of the following development languages:

1.2. Hardware Requirements

AcitveXperts MMS Toolkit supports the following hardware:


1.3. MMS Toolkit Architecture

ActiveXperts MMS Toolkit is built on top of the Microsoft serial device drivers, TAPI drivers and RRAS (Routing and Remote Access). It does NOT replace any Windows drivers during installation; it neither adds any files or components to the Windows or Windows System directory.

The core of MMS Toolkit consists of one single file:

The component encapsulates the following objects:
ActiveXperts MMS Toolkit can be distributed easily to many PC's. Once you have purchased the licenses, you copy the AMmsCtrl.dll to the PCs and register the DLL on that PC. Click here for more information about the installation.



2. System Requirements

2.1. ASP .NET, VB .NET, VC# .NET, ASP, VB, Visual C++ and more

ActiveXperts MMS Toolkit can be used in any of these languages:

2.2. .NET Framework

To use ActiveXperts MMS Toolkit in an ASP .NET, Visual Basic .NET or Visual C#. NET environment, the .NET Framework must be installed on the system. The .NET Framework is part of the Windows 2003 Operating System. On Windows 2000, Windows 98, Windows ME, Windows NT, Windows Server 2003, Windows XP, it's available as a separate installation. Please visit the Technology Information for the .NET Framework page to download the .NET Framework.

2.3. Internet Information Server

Internet Information Server (IIS) Setup installs the Visual Basic Script and Java Script engines.

To run ASP pages on NT4 Servers, IIS 4.x must be installed. IIS 4.x ships with the NT4 Option Pack CD's.
To run ASP pages on Windows XP Professional and Windows 2000/2003 Servers, IIS 5.x or higher must be installed. IIS is part of the Windows XP Professional and Windows 2000/2003 Operating Systems. IIS is NOT supported on Windows XP Home and Windows 98/ME.

2.4. Internet Explorer 4.x or higher

The Internet Explorer 4.x Setup (or higher) installs the Visual Basic Script and Java Script engines.
You can use ActiveXperts MMS Toolkit component from client HTML browser using Javascript.

2.5. Windows Scripting Host

ActiveXperts MMS Toolkit can be used in VBScript scripts. VBScripts can be used by passing the script-file as a parameter to the scripting host ( either 'cscript' or 'wscript').
WSH relies on the Visual Basic Script and Java Script engines provided with Internet Explorer 4.x or later. WSH is also installed as part of Windows 98, Windows 2000/2003, Windows XP and Internet Information Services 4.0 or higher. A separate setup program is provided for Windows 95.

2.6. Visual Basic

ActiveXperts MMS Toolkit can be used in Visual Basic 5.x or higher.

2.7. Visual C++

ActiveXperts MMS Toolkit can be used in Visual C++ 5.x or higher.

2.8. Delphi

ActiveXperts MMS Toolkit can be used in Borland Delphi 6.x or higher.



3. Installation

ActiveXperts MMS Toolkit package consists of 4 components; any combination of components can be installed:

3.1. Automatic Installation

Simply run the AMMSTOOL.EXE Setup program; you can download this Setup file here.
The InstallShield wizard will guide you through the rest of the setup.
The Setup program can will installation and registration of the ActiveX/COM component automatically.

Any subsequent installation of ActiveXperts MMS Toolkit can be performed either manually or by using the Automatic Installation.

3.2. Manual installation

To install the ActiveX/COM component manually, simply perform the following tasks:



4. How to use the MMS Toolkit objects

4.1. Introduction

The following code snippet (VBScript) illustrate how to send an MMS message using ActiveXperts MMS Toolkit.


Send an MMS message (via a GPRS Modem using MM1 protocol)

    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) ' Create a new instance of MM1Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment        "logo.gif"                          ' Add a multimedia attachment
    objSlide.AddText              "The ActiveXperts logo"             ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
   
    ' MMS Connection: Set device
    objConnection.Device          = "Falcom SAMBA 75 GSM/GPRS Modem"  ' Set GSM/GPRS modem
 
    ' MMS Connection: Load provider properties
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    
    ' MMS Connection: Connect
    objConnection.Connect()
    If ( objConnection.LastError <> 0 ) Then
        WScript.Quit
    End If
    
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )
 
    ' MMS Connection: Disconnect
    objConnection.Disconnect()

4.2. Visual Basic .NET

Make sure that ActiveXperts MMS Toolkit Toolkit is installed on your system. For details about installation, click here.

Add a reference to the object using the Visual Basic Solution Explorer:

You can create a new Constants object in the following way:
  Imports AMmsCtrl
  ...
  Dim objConstants As MMSConstants                      ' Declaration
  objConstants = New MMSConstants()                     ' Creation
If you use a GPRS modem (or GPRS phone) to send MMS messages, create a new MM1Connection object in the following way:
  Imports AMmsCtrl
  ...
  Dim objConnection As MM1Connection                    ' Declaration
  objConnection = New MM1Connection()                   ' Creation
If you use SMTP to send MMS messages, create a new MM4Connection object in the following way:
  Imports AMmsCtrl
  ...
  Dim objConnection As MM4Connection                    ' Declaration
  objConnection = New MM4Connection()                   ' Creation
If you use HTTP/SOAP to send MMS messages, create a new MM7Connection object in the following way:
  Imports AMmsCtrl
  ...
  Dim objConnection As MM7Connection                    ' Declaration
  objConnection = New MM7Connection()                   ' Creation
Create a new MMSMessage object in the following way:
  Imports AMmsCtrl
  ...
  Dim objMessage As MMSMessage                          ' Declaration
  objMessage = New MMSMessage()                         ' Creation
Create a new MMSSlide object in the following way:
  Imports AMmsCtrl
  ...
  Dim objSlide As MMSSlide                              ' Declaration
  objSlide = New MMSSlide()                             ' Creation
After these declarations and creation of the object(s), you can use the objects in your Visual Basic .NET projects.

4.3. Visual C# .NET

Make sure that ActiveXperts MMS Toolkit Toolkit is installed on your system.
Add a reference to the object using the Visual C# Solution Explorer:
  • Start the Solution Provider, go to the project's 'References' container;
  • Choose 'Add Reference' from the context menu;
  • From the COM components tab, choose the 'ActiveXperts MMS Toolkit' component.

You can create a new
Constants object in the following way:
   using AMmsCtrl;
   ...
   MMSConstants objConstants;                           // Declaration
   objConstants = new MMSConstants();                   // Creation
If you use a GPRS modem (or GPRS phone) to send MMS messages, create a new MM1Connection object in the following way:
   using AMmsCtrl;
   ...
   MM1Connection objMM1Connection;                      // Declaration
   objMM1Connection = new MM1Connection();              // Creation
If you use SMTP to send MMS messages, create a new MM4Connection object in the following way:
   using AMmsCtrl;
   ...
   MM4Connection objMM4Connection;                      // Declaration
   objMM4Connection = new MM4Connection();              // Creation
If you use HTTP/SOAP to send MMS messages, create a new MM7Connection object in the following way:
   using AMmsCtrl;
   ...
   MM7Connection objMM7Connection;                      // Declaration
   objMM7Connection = new MM7Connection();              // Creation
Create a new MMSMessage object in the following way:
   using AMmsCtrl;
   ...
   MMSMessage objMessage;                               // Declaration
   objMessage = new MMSMessage();                       // Creation
Create a new MMSlide object in the following way:
   using AMmsCtrl;
   ...
   MMSSlide objSlide;                                   // Declaration
   objSlide = new MMSSlide();                           // Creation

After these declarations and creation of the object(s), you can use the objects inside your Visual C# .NET code.

4.4. Visual Basic

Make sure that ActiveXperts MMS Toolkit Toolkit is installed on your system.
ActiveXperts MMS Toolkit can be used in Visual Basic 5.x or higher. In Visual Basic, go to the 'Project/References...' menu item and check the box next to 'ActiveXperts MMS Toolkit' Type Library. Now, you can declare and create MMS objects.


You can create a new Constants object in the following way:
  Dim objConstants As AMmsCtrl.MMSConstants                ' Declaration              
  Set objConstants = CreateObject( "ActiveXperts.MMSConstants" )     ' Creation
If you use a GPRS modem (or GPRS phone) to send MMS messages, create a new MM1Connection object in the following way:
  Dim objConnection As AMmsCtrl.MM1Connection                        ' Declaration              
  Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )   ' Creation
If you use SMTP to send MMS messages, create a new MM4Connection object in the following way:
  Dim objConnection As AMmsCtrl.MM4Connection                        ' Declaration              
  Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )   ' Creation
If you use HTTP/SOAP to send MMS messages, create a new MM7Connection object in the following way:
  Dim objConnection As AMmsCtrl.MM7Connection                        ' Declaration              
  Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )   ' Creation
Create a new MMSMessage object in the following way:
  Dim objMessage As AMmsCtrl.MMSMessage                              ' Declaration              
  Set objMessage = CreateObject( "ActiveXperts.MMSMessage" )         ' Creation
Create a new MMSlide object in the following way:
  Dim objSlide As AMmsCtrl.MMSSlide                                  ' Declaration              
  Set objSlide = CreateObject( "ActiveXperts.MMSSlide" )             ' Creation

After these declarations and creation of the object(s), you can use the objects in your Visual Basic projects.

4.5. Visual C++

Make sure that ActiveXperts MMS Toolkit Toolkit is installed on your system.
ActiveXperts MMS Toolkit can be used in Visual C++ projects. Include the *.h and *.c file provided by ActiveXperts to bind your code to the MMS component. These files are located in the Include directory of the Visual C++ samples directory. These are the files:
You can create a new Constants object in the following way:
   IConstants *pConstants;                            // Declaration
   CoCreateInstance(CLSID_MMSConstants, NULL, CLSCTX_INPROC_SERVER, IID_IMMSConstants, (void**) &pConstants);    // Creation
If you use a GPRS modem (or GPRS phone) to send MMS messages, create a new MM1Connection object in the following way:
   IMM1Connection       *pConnection;                 // Declaration
   CoCreateInstance(CLSID_MM1Connection, NULL, CLSCTX_INPROC_SERVER, IID_IMM1Connection, (void**) &pConnection); // Creation
If you use SMTP to send MMS messages, create a new MM4Connection object in the following way:
   IMM4Connection       *pConnection;                 // Declaration
   CoCreateInstance(CLSID_MM4Connection, NULL, CLSCTX_INPROC_SERVER, IID_IMM4Connection, (void**) &pConnection); // Creation
If you use HTTP/SOAP to send MMS messages, create a new MM7Connection object in the following way:
   IMM7Connection       *pConnection;                 // Declaration
   CoCreateInstance(CLSID_MM7Connection, NULL, CLSCTX_INPROC_SERVER, IID_IMM7Connection, (void**) &pConnection); // Creation
Create a new MMSMessage object in the following way:
   IMMSMessage        *pMessage;                      // Declaration
   CoCreateInstance(CLSID_MMSMessage, NULL, CLSCTX_INPROC_SERVER, IID_IMMSMessage, (void**) &pMessage);          // Creation
Create a new MMSlide object in the following way:
   IMMSSlide        *pSlide;                          // Declaration
   CoCreateInstance(CLSID_MMSSlide, NULL, CLSCTX_INPROC_SERVER, IID_IMMSSlide, (void**) &pSlide);                // Creation

4.6. Delphi 6.x or higher

Make sure that ActiveXperts MMS Toolkit Toolkit is installed on your system. For details about installation, click here.

First, add a reference to the MMS Toolkit objects:

You can create a new Constants object in the following way:
  MmsConstants : TMMSConstants;                          ' Declaration of the wrapper class
  objConstants : IMMSConstants;                          ' Declaration of the interface class
  objConstants := MMSConstants.DefaultInterface;         ' Creation new instance of the object
If you use a GPRS modem (or GPRS phone) to send MMS messages, create a new MM1Connection object in the following way:
  MM1Connection : TMM1Connection;                        ' Declaration of the wrapper class
  objMM1Connection : IMM1Connection;                     ' Declaration of the interface class
  objMM1Connection := MM1Connection.DefaultInterface;    ' Creation new instance of the object
If you use SMTP to send MMS messages, create a new MM4Connection object in the following way:
  MM4Connection : TMM4Connection;                        ' Declaration of the wrapper class
  objMM4Connection : IMM4Connection;                     ' Declaration of the interface class
  objMM4Connection := MM4Connection.DefaultInterface;    ' Creation new instance of the object
If you use HTTP/SOAP to send MMS messages, create a new MM7Connection object in the following way:
  MM7Connection : TMM7Connection;                        ' Declaration of the wrapper class
  objMM7Connection : IMM7Connection;                     ' Declaration of the interface class
  objMM7Connection := MM7Connection.DefaultInterface;    ' Creation new instance of the object
Create a new MMSMessage object in the following way:
  MMSMessage : TMMSMessage;                              ' Declaration of the wrapper class
  objMessage : IMMSMessage;                              ' Declaration of the interface class
  objMessage := MMSMessage.DefaultInterface;             ' Creation new instance of the object
Create a new MMSlide object in the following way:
  MMSSlide : TMMSSlide;                                  ' Declaration of the wrapper class
  objSlide : IMMSSlide;                                  ' Declaration of the interface class
  objSlide := MMSSlide.DefaultInterface;                 ' Creation new instance of the object
After these declarations and creation of the object(s), you can use the objects in your Visual Basic .NET projects.

4.7. ASP 2.x environment

Simply create the objects in the following way:
  <html>
  <body>
  Version:
  <script language=vbscript runat=server>
    Set objConstants       = CreateObject( "ActiveXperts.MMSConstants" )
    Set objMM1Connection   = CreateObject( "ActiveXperts.MM1Connection" )
    Set objMM4Connection   = CreateObject( "ActiveXperts.MM4Connection" )
    Set objMM7Connection   = CreateObject( "ActiveXperts.MM7Connection" )
    Set objMessage         = CreateObject( "ActiveXperts.MMSMessage" )
    Set objSlide           = CreateObject( "ActiveXperts.MMSSlide" )
    ....
    Response.Write objMM1Connection.Version
    ....
  </script>
  </body>
  </html>



5. Error Codes and Constants

5.1. Error Codes

When a function is called, the result of the function is stored in the object's 'LastError' property.
When 'LastError' is 0, it means that the last called function completed successfully; otherwise, an error occured.

The value of the LastError tells you why the function failed. All error codes are listed on the ActiveXperts web site:

www.activexperts.com/support/errorcodes (list of error codes).

Here, you can also lookup a specific error to find its description.

You can also call the 'GetErrorDescription' function of any of the objects to find the error description.

5.2. Constants

In MMS Toolkit, all constants are grouped together in a separate object called Constants. You must first create the Constants object before you can actually use the constants:
   Set objConstants = CreateObject( "ActiveXperts.MMSConstants" )
   WScript.Echo objConstants.asMMS_PRIORITY_LOW
   WScript.Echo objConstants.asMMS_PRIORITY_NORMAL
   WScript.Echo objConstants.asMMS_PRIORITY_HIGH
   ...
 
5.2.1. Message Class Types

Name Description
asMMS_CLASS_PERSONAL A phone-to-phone MMS message. One user sending a personal message to another user.
asMMS_CLASS_ADVERTISEMENT The MMS message is an advert. Users who have switched off advertisement MMS messages won't receive this type of messages;
asMMS_CLASS_INFORMATIONAL The MMS message is informational. Users who have switched off informational MMS messages won't receive this type of messages;
asMMS_CLASS_AUTO The class of MMS message is automatically set by the provider, i.e. the provider default is used.

 
5.2.2. Message Priority Types

Name Description
asMMS_PRIORITY_LOW High priority MMS message
asMMS_PRIORITY_NORMAL Normal priority MMS message
asMMS_PRIORITY_HIGH High priority MMS message

 
5.2.3. Digital Rights Managent Types

Name Description
asMMS_DRM_FORWARDLOCK Most basic level of DRM. When "Forward Lock" is enabled, this indicates that the receiving device should not allow any non-text objects in the message to be forwarded off of the device
asMMS_DRM_PLAY Permission to play the MMS message
asMMS_DRM_DISPLAY Permission to display the MMS message
asMMS_DRM_EXECUTE Permission to execute the MMS message

 
5.2.4. MMS File Types

Name Description
asMMS_MM1FILE_MSENDREQ Save MMS file in submit format (Client to MMSC).
asMMS_MM1FILE_MRETRIEVECONF Save MMS file in deliver format (MMSC to Client).

 
5.2.5. MM7 Protocol Variation Types

Name Description
asMMS_MM7VARIATION_3GPP Use 3GPPP MM7 standard for sending MMS using SOAP.
asMMS_MM7VARIATION_ERICSSON Use Ericsson MM7 standard for sending MMS using SOAP.
asMMS_MM7VARIATION_PAP Use PAP MM7 standard for sending MMS using SOAP.

 
5.2.6. MMS 3GPP Protocol Version Types

Name Description
asMMS_VERSION_5_2_0 Use 3GPPP version 5.2.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_3_0 Use 3GPPP version 5.3.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_4_0 Use 3GPPP version 5.4.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_5_0 Use 3GPPP version 5.5.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_6_0 Use 3GPPP version 5.6.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_7_0 Use 3GPPP version 5.7.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_8_0 Use 3GPPP version 5.8.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_9_0 Use 3GPPP version 5.9.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_10_0 Use 3GPPP version 5.10.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_5_11_0 Use 3GPPP version 5.11.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_0_0 Use 3GPPP version 6.0.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_1_0 Use 3GPPP version 6.1.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_2_0 Use 3GPPP version 6.2.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_3_0 Use 3GPPP version 6.3.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_4_0 Use 3GPPP version 6.4.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_5_0 Use 3GPPP version 6.5.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_6_0 Use 3GPPP version 6.6.0 for sending MMS using MM4 or MM7.
asMMS_VERSION_6_7_0 Use 3GPPP version 6.7.0 for sending MMS using MM4 or MM7.

 
5.2.7. MM7 XML Schema Types

Name Description
asMMS_SCHEMA_REL5_MM7_1_0 Use REL5_MM7_1_0 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_1 Use REL5_MM7_1_1 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_2 Use REL5_MM7_1_2 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_3 Use REL5_MM7_1_3 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_4 Use REL5_MM7_1_4 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_5 Use REL5_MM7_1_5 XML MM7 Schema.
asMMS_SCHEMA_REL6_MM7_1_0 Use REL6_MM7_1_0 XML MM7 Schema.
asMMS_SCHEMA_REL6_MM7_1_1 Use REL6_MM7_1_1 XML MM7 Schema.
asMMS_SCHEMA_REL6_MM7_1_2 Use REL6_MM7_1_2 XML MM7 Schema.
asMMS_SCHEMA_REL5_MM7_1_3 Use REL6_MM7_1_3 XML MM7 Schema.




6. MMSSlide Object


6.1. MMSSlide Object - Introduction

The MMSSlide object holds all information about a single MMS slide. A slide is a set of multimedia items and descriptions.
You can think of a slide that consists of two pictures and a small plain-text explanation. A slide can be added to an MMSMessage object. You can add multiple MMS slides to a single MMS message. The MMSMessage object should contain at least one MMS slide in order to send it out through an MM1, MM4 or MM7 connection.

The following sample demonstrates how create a slide with two pictures and a small plain-text description:
   Set objSlide                 = CreateObject ( "ActiveXperts.MMSSlide" )       ' Create a new MMSSlide instance
 
   ' MMSlide: Add duration, attachments(s) and text(s)
   objSlide.Duration            = 10                                             ' Display this screen for 10 seconds
   objSlide.AddAttachment       "c:\my pictures\picture1.jpg"                    ' Add a new picture
   objSlide.AddAttachment       "c:\my pictures\picture2.jpg"                    ' Add another picture
   objSlide.AddText             "The ActiveXperts logo"                          ' Add description

In order to send the slide as part of an MMS message, you must first add the slide to a message, like this
   Set objSlide                 = CreateObject ( "ActiveXperts.MMSSlide" )       ' Create a new MMSSlide instance
   Set objMessage               = CreateObject ( "ActiveXperts.MMSMessage" )     ' Create a new MMSMessage instance
   ...
   objSlide.AddAttachment( ... )
   ...
   objMessage.AddSlide( objSlide )                                               ' Add slide to the message; you can add multiple slides

   ' NOTE: MMS Messages are discussed in Chapter 7: MMSMessage object

Finally, you want to send the MMS message, containing the slide(s), like this:
   ' MMS Connection: Set properties
   objConnection.Device          = "Falcom SAMBA 75 GSM/GPRS Modem"              ' Set GSM/GPRS modem
   ...
   objConnection.Connect()                                                       ' Connect
   If ( objConnection.LastError <> 0 ) Then
       WScript.Quit
   End If
   
   objConnection.Send ( objMessage )                                             ' Send MMSMessage, including one or more slides
   objConnection.Disconnect()                                                    ' Disconnect
   
   

6.2. MMSSlide Object - Overview of Properties and Functions

Property Type In/Out Mand/Opt Description
Duration number In/Out O Duration of the slide, in seconds
LastError Number Out n/a Result of the last called function

Function Description
Clear Clear all properties
AddAttachment Add a new multimedia attachment
AddText Add a new text description
GetErrorDescription Lookup error description of the given error code

6.3. MMSSlide Object - Properties


 Duration property

Type:
Number
Description:
Duration - in seconds - that a slide will be displayed on the remote users device. Default: 10 seconds.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.Duration      = 10                                           ' Display this screen for 10 seconds
    ...

 LastError property

Type:
Number
Description:
The result of a previously called function. Should be used to check the result of your last function call. All functions (methods) store the result into the 'LastError' property. The property is read-only; you cannot assign a value to it.

For more information about error codes, click here.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add an image file as attachment
    WScript.Echo "LastError: " & objSlide.LastError                       ' Show the result of 'AddAttachment'

6.4. MMSMessage Object - Functions


 Clear function

Description:
This function resets all Properties to their initial, default values.
Parameters:
None
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.Duration      = 5                                           
    objSlide.Clear()                                                      ' Clear properties
    WScript.Echo objSlide.Duration                                        ' Default duration (10) will be displayed

 AddAtachment function

Description:
This function adds a new multimedia file to the slide.
Parameters:
A valid filename
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add a multimedia file
    WScript.Echo "LastError: " & objSlide.LastError                       ' Show the result of 'AddAttachment'

 AddText function

Description:
This function adds a new text description file to the slide.
Parameters:
The text description
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddText( "Hello, world!" )                                   ' Add a text description
    WScript.Echo "LastError: " & objSlide.LastError                       ' Show the result of 'AddText'

 GetErrorDescription function

Description:
Function to retrieve the explanation of an error code.
Parameters:
Error code
Return value:
The Error string.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add a multimedia file
    WScript.Echo "LastError: " & objSlide.LastError & _                   ' Show the result of 'AddText'
                 objSlide.GetErrorDescription( objSlide.LastError )       ' Show the verbose result of 'AddText'
	



7. MMSMessage Object


7.1. MMSMessage Object - Introduction

The MMSMessage object holds all information a new outgoing MMS message. The MMSMessage object should contain at least one MMS slide in order to send it out through an MM1, MM4 or MM7 connection.

The following sample demonstrates how to send an MMS message to a remote recipient using the MMSMessage object:
   Set objConnection             = CreateObject ( "ActiveXperts.MM1Connection" )
   Set objMessage                = CreateObject ( "ActiveXperts.MMSMessage" )
   Set objSlide                  = CreateObject ( "ActiveXperts.MMSSlide" )
   Set objConstants              = CreateObject ( "ActiveXperts.MMSConstants" )
  
   ' MMSlide: Add duration, attachments(s) and text(s)
   objSlide.Clear()
   objSlide.Duration             = 10                                ' Display this screen for 10 seconds
   objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
   objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
 
   ' MMSMessage: Set properties
   objMessage.Clear()                                                ' Clear the message object (good practise)
   objMessage.Subject            = "My Message"                      ' Subject of the message
   objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
   
   ' MMSMessage: Add slide
   objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
  
   ' MMS Connection: Set properties
   NOTE: You can find settings for various providers all over the wold here: www.activexperts.com/mmstoolkit/mmsclist
   objConnection.Device          = "Falcom SAMBA 75 GSM/GPRS Modem"  ' Set GSM/GPRS modem
   objConnection.ProviderAPN     = "MMS"                             ' Provider's Access Point Name
   objConnection.ProviderAPNAccount  = ""                            ' Provider login (not required for all providers)
   objConnection.ProviderAPNPassword = ""                            ' Provider login (not required for all providers)
   objConnection.ProviderWAPGateway  = "10.250.255.183"              ' Provider's WAPgateway address
   objConnection.ProviderMMSC    = "http://mms.orange.nl:8002/"      ' Provider's MMS Server Provider Center address
   
   ' MMS Connection: Connect
   objConnection.Connect()
   If ( objConnection.LastError <> 0 ) Then
       WScript.Quit
   End If
   
   ' MMS Connection: Send the MMSMessage, including one or more slides
   objConnection.Send ( objMessage )

   ' MMS Connection: Disconnect
   objConnection.Disconnect()

7.2. MMSMessage Object - Overview of Properties and Functions

Property Type In/Out Mand/Opt Description
From String In/Out O E-mail address, phone number or IP address of the originator
Class String In/Out O Message class
Priority Number In/Out O Message priority (low, normal or high)
Subject String In/Out O Subject of the message
LastError Number Out n/a Result of the last called function

Function Description
Clear Clear all properties
AddTo Add a new recipient
AddCc Add a new CC (carbon copy) recipient
AddBcc Add a new BCC (blind carbon copy) recipient
AddSlide Add a new slide to the message
LoadFromFile Load a message from file into memory
SaveToFile Save the message into a single file
GetErrorDescription Lookup error description of the given error code

7.3. MMSMessage Object - Properties


 From property

Type:
String
Description:
Phone number, e-mail address or IP number of the sender. If the field is left blank, the provider will assign the sender address automatically.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    objMMSMessage.From     = "+31625044454"                              ' Set sender address

 Class property

Type:
Number
Description:
The message class is primarily indended for the remote recipient, to handle different types of messages different. Valid values are: asMMS_CLASS_PERSONAL, asMMS_CLASS_ADVERTISEMENT, asMMS_CLASS_INFORMATIONAL and asMMS_CLASS_AUTO.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    Set objMMSConstants    = CreateObject( "ActiveXperts.MMSConstants" ) ' Create Constants instance
    objMMSMessage.Class    = objMMSConstants.asMMS_CLASS_INFORMATIONAL   ' Set message class to 'informational'

 Priority property

Type:
Number
Description:
The message priority determines the priority of the message, and is primarily indended for the remote recipient, to have get different tpyes of indication for new incoming messages. Valid values are: asMMS_PRIORITY_LOW, asMMS_PRIORITY_NORMAL and asMMS_PRIORITY_HIGH.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    Set objMMSConstants    = CreateObject( "ActiveXperts.MMSConstants" ) ' Create Constants instance
    objMMSMessage.Priority = objMMSConstants.asMMS_PRIORITY_HIGH

 Subject property

Type:
String
Description:
The subject of the MMS message.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    objMMSMessage.Subject  = "My MMS message to you"                     ' Set subject

 LastError property

Type:
Number
Description:
The result of a previously called function. Should be used to check the result of your last function call. All functions (methods) store the result into the 'LastError' property. The property is read-only; you cannot assign a value to it.

For more information about error codes, click here.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )       ' Create MMSMessage instance
    ...
    objMMSMessage.AddSlide( ... )
    WScript.Echo "LastError: " & objMMSMessage.LastError                     ' Show the result of 'AddSlide'

7.4. MMSMessage Object - Functions


 Clear function

Description:
This function resets all Properties to their initial, default values.
Parameters:
  • None
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    objMMSMessage.From     = "+314412345678"
    ...
    objMMSMessage.Clear()                                                ' Clear all properties

 AddTo,
 AddCc,
 AddBcc functions

Description:
This function adds a new recipient or (blind) carbon copy recipient to the message. Two types of MMS recipients are supported:
  • Mobile number - The remote user's mobile numer. It is recommended to use the international dialing format, i.e. a number prefixed by a '+' character and the international dialing code. For example: +4412345678 (a number in the UK, +44);
  • E-mail address.
Parameters:
Mobile number or e-mail address of the recipient
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    objMMSMessage.AddTo( "+4412345678" )                                 ' Recipient in the UK, a mobile number
    objMMSMessage.AddCc( "+4412345679" )                                 ' CC recipient in the UK, a mobile number
    objMMSMessage.AddBcc( "info@activexperts.com" )                      ' BCC recipient, an e-mail address

 AddSlide function

Description:
This function adds a slide to a message. The function returns a MMSSlide object. You can edit this MMSSlide, to add a picture, message text, etc.
Parameters:
A slide
Return value:
Check LastError property to see if the function was completed successfully.
Example:
    Set objConnection      = CreateObject( "ActiveXperts.MM1Connection" )
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    Set objSlide           = CreateObject( "ActiveXperts.MMSSlide" )
    ...
    objSlide.Duration        = 10          
    objSlide.AddAttachment( "logo.gif" )
    objSlide.AddText( "The ActiveXperts logo" )
    objMMSMessage.AddSlide( objSlide )                                   ' Add slide to the message
    ...
    objConnection.Connect ()
    objConnection.Send( objMMSMessage )
    ...

 SaveToFile function

Description:
With SaveToFile, you can save an MMS message (including all slides) that was so it can be used by a third party application, or by the 'LoadFromFile' function.
Parameters:
A valid filename
The message format, possible values are:
  • asMMS_MM1FILE_MSENDREQ; Save MMS file in submit format (Client to MMSC);
  • asMMS_MM1FILE_MRETRIEVECONF; Save MMS file in deliver format (MMSC to Client).
Return value:
Check LastError property to see if the function was completed successfully.
Example:
    Set objConstants       = CreateObject ( "ActiveXperts.SMSConstants" )
    Set objMMSMessage      = CreateObject ( "ActiveXperts.MMSMessage" )                   ' Create MMSMessage instance
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )
    ...
    objSlide.Duration      = 10          'Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )
    objSlide.AddText( "The ActiveXperts logo" )
    ...
    objMMSMessage.AddSlide( objSlide )                                                    ' Add the slide
    objMMSMessage.SaveToFile( "C:\Temp\File.mms", objConstants.asMMS_MM1FILE_MSENDREQ )   ' Save message incl. slide(s)
    ...	

 LoadFromFile function

Description:
With LoadFromFile, you can load an MMS message (including all slides) that was created by a third party application, or by the 'SaveToFile' function.
Parameters:
A valid filename
Return value:
Check LastError property to see if the function was completed successfully.
Example:
    Set objConnection      = CreateObject( "ActiveXperts.MM1Connection" )
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    ...
    objMessage.Clear                                                     ' Clear message, incl. all slides
    objMMSMessage.LoadFromFile( "C:\Temp\File.mms" )                     ' Load message incl. slides 
    ...
    objConnection.Send ( objMMSMessage )

 GetErrorDescription function

Description:
Function to retrieve the explanation of an error code.
Parameters:
Error code.
Return value:
The Error string.
Example:
    Set objMMSMessage      = CreateObject( "ActiveXperts.MMSMessage" )   ' Create MMSMessage instance
    objMMSMessage.AddRecipient( "+31625044454" )
    If objMMSMessage.LastError <> 0 Then
      WScript.Echo "Error description: " & objobjMMSMessage.GetErrorDescription( objMMSMessage.LastError )
    End If



8. MM1Connection Object


8.1. MM1Connection Object - Introduction

The MM1Connection object provides functionality to connect to an MMS provider over GPRS and deliver an MMS message.
To be able to connect to an MMSC provider, you need a GSM/GRPS modem with a GPRS subscription to a
To connect to the MMS provider using a GSM/GPRS modem, the following steps are taken:
The following sample demonstrates how to send an MMS message to a remote recipient using the MMSMessage object:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) ' Create a new instance of MM1Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
   
    ' MMS Connection: Set device
    objConnection.Device          = "Falcom SAMBA 75 GSM/GPRS Modem"  ' Set GSM/GPRS modem
 
    ' MMS Connection: Set provider properties (see also www.activexperts.com/mmstoolkit/mmsclist
    objConnection.ProviderAPN         = "wap.vodafone.co.uk"          ' Provider's Access Point Name
    objConnection.ProviderAPNAccount  = ""                            ' Provider login (not required for all providers)
    objConnection.ProviderAPNPassword = ""                            ' Provider login (not required for all providers)
    objConnection.ProviderWAPGateway  = "212.183.137.12"              ' Provider's WAPgateway address
    objConnection.ProviderMMSC    = "mms.vodafone.co.uk/servlets/mms" ' Provider's MMS Server Provider Center address
    
    ' MMS Connection: Connect
    objConnection.Connect()
    If ( objConnection.LastError <> 0 ) Then
        WScript.Quit
    End If
    
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )
 
    ' MMS Connection: Disconnect
    objConnection.Disconnect()
The above ProviderXYZ properties all depend on the MMS provider you are connecting to. ActiveXperts has collected provider information for all major MMS providers all over the world. These properties are stored in so called MM1 files; these MM1 files are shipped with the product, and are located in: <install-dir>\Mmsc\Mm1>. You can use a function 'LoadProviderConfig' to load all provider-depend information directly into the ProviderXYZ properties.

The following sample is similar to the above sample, but instead, LoadProviderConfig is used:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) ' Create a new instance of MM1Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
   
    ' MMS Connection: Set device
    objConnection.Device          = "Falcom SAMBA 75 GSM/GPRS Modem"  ' Set GSM/GPRS modem
 
    ' MMS Connection: Load provider properties
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    
    ' MMS Connection: Connect
    objConnection.Connect()
    If ( objConnection.LastError <> 0 ) Then
        WScript.Quit
    End If
    
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )
 
    ' MMS Connection: Disconnect
    objConnection.Disconnect()

8.2. MM1Connection Object - Overview of Properties and Functions

Property Type In/Out Mand/Opt Description
Version String Out n/a Product version number
ExpirationDate String Out n/a Product expiration date
Device String In/Out M Name of the GSM/GPRS modem you want to use for sending MMS messages
ProviderAPN String In/Out M Name of provider's access point
ProviderAPNAccount String In/Out O Login used to connect to the provider's access point
ProviderAPNPassword String In/Out O Password used to connect to the provider's access point
ProviderWAPGateway String In/Out M IP address of the proivder's WAP gateway
ProviderMMSC String In/Out M Provider's MMSC URL
ProivderResponse String Out n/a Last response of the provider
MessageID String Out n/a Message ID of the most recently sent MMS message
LastError Number Out n/a Result of the last called function
LogFile String In/Out O All GSM/GPRS commands and responses are logged to this file

Function Description
Clear Clear all properties
GetDeviceCount Return the number of Windows telephony devices installed on the local computer
GetDevice Retrieve a Windows telephony device name
EnterPin Enter Pincode (required if SIM card is pin protected)
LoadProviderConfig Load the provider properties from a config file
SaveProviderConfig Save the provider properties to a config file
Connect Connect to the provider's MMSC center
Disconnect Disconnect from the provider's MMSC center
Send Send the MMS message

8.3. MM1Connection Object - Properties


 Version property

Type:
String
Description:
Version information of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" ) ' Create a new instance of MM1Connection
    WScript.Echo "Version: " & objConnection.Version                      ' Display version information

 ExpirationDate property

Type:
String
Description:
Expiration date of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Once you have registered the product, the property holds the empty string value.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    WScript.Echo "ExpirationDate: " & objConnection.ExpirationDate        ' Display expiration information        

 Device property

Type:
String
Description:
The preferred device for sending MMS messages.
You must use a Windows telephony device; you cannot use a physical COM port directly (e.g., no "COM1:" allowed).
The Windows telephony device name must be the literal name as it appears in Modems tab of the Phone and Modems Options applet in the Control Panel. For instance: "Falcom SAMBA 75 GSM/GPRS Modem";
Use the GetDevice function to iterate over the installed Windows telephony devices;
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.Device = "Falcom SAMBA 75 GSM/GPRS Modem"               ' Use a Windows telephony device

 ProviderAPN property

Type:
String
Description:
The provider's access point name. Access point names different from provider to provider, and also vary from country to country.
Check out our list of most used providers all over the world: www.activexperts.com/mmstoolkit/mmsclist.

Instead of assigning ProviderAPN directly, you can call LoadProviderConfig so set the property automatically, using a valid MM1 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.ProviderAPN = "wap.vodafone.co.uk"                      ' Use 'wap.vodafone.co.uk ' as access point name
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    WScript.Echo objConnection.ProviderAPN                                ' Displays: 'wap.vodafone.co.uk'

 ProviderAPNAccount
 ProviderAPNPassword properties


Type:
String
Description:
The login and password used the access the provider's access point. If a login and password is not required, you can leave these properties blank. Check out the following page for a valid login and password for your provider: www.activexperts.com/mmstoolkit/mmsclist.

Instead of assigning ProviderAPNAccount and ProviderAPNPassword directly, you can call LoadProviderConfig so set the property automatically, using a valid MM1 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.ProviderLogin    = "wap.vodafone.co.uk "                ' APN login
    objConnection.ProviderPassword = "wap.vodafone.co.uk "                ' APN password
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\Germany\T-Mobile.mm1" )
    WScript.Echo objConnection.ProviderLogin                              ' Displays: 't-mobil'
    WScript.Echo objConnection.ProviderPassword                           ' Displays: 'mms'

 ProviderWAPGateway property

Type:
String
Description:
The provider's WAP gateway address.
Check out our list of most used providers all over the world: www.activexperts.com/mmstoolkit/mmsclist.

Instead of assigning ProviderWAPGateway directly, you can call LoadProviderConfig so set the property automatically, using a valid MM1 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.ProviderWAPGateway = "212.183.137.12"	                  ' Use '212.183.137.12' as WAP Gateway address
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    WScript.Echo objConnection.ProviderWAPGateway                         ' Displays: '212.183.137.12'

 ProviderMMSC property

Type:
String
Description:
The provider's MMSC URL.
Check out our list of most used providers all over the world: www.activexperts.com/mmstoolkit/mmsclist.

Instead of assigning ProviderMMSC directly, you can call LoadProviderConfig so set the property automatically, using a valid MM1 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.ProviderMMSC = "mms.vodafone.co.uk/servlets/mms"        ' Use '212.183.137.12' as WAP Gateway address
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    WScript.Echo objConnection.ProviderMMSC                         ' Displays: 'mms.vodafone.co.uk/servlets/mms'

 ProviderResponse property

Type:
String
Description:
The last response of the MMSC provider server. The property is read-only; you cannot assign a value to it. The property can be very useful for troubleshooting purposes: when an MMS fails, this information probably explains exactly what went wrong.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) 
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )   
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      
  
    objSlide.AddAttachment( "logo.gif" )                              
    objMessage.AddTo( "+4412345678" )                                    
    objMessage.AddSlide( objSlide )                                      
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    ...
    objConnection.Connect()

    objConnection.Send ( objMessage )
    WScript.Echo objConnection.ProviderResponse                            ' Show provider's last response
    ...
    objConnection.Disconnect()

 LastError property

Type:
Number
Description:
The result of a previously called function. Should be used to check the result of your last function call. All functions (methods) store the result into the 'LastError' property. The property is read-only; you cannot assign a value to it.

For more information about error codes, click here.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) 
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
    ...
    objConnection.Connect()
    ...
    WScript.Echo objConnection.LastError                            ' Show provider's last response
    ...
    objConnection.Disconnect()

 LogFile property

Type:
String
Description:
By default, LogFile holds the empty string and nothing is logged. If you assign a valid file name to it, all device commands and responses will be written to this log file. Output is always appended.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) 
    ...
    objConnection.LogFile = "C:\MMSLog.txt"
    ...
    objConnection.Connect()
    ...

8.4. MM1Connection Object - Functions


 Clear function

Description:
This function resets all Properties to their initial, default values.
Parameters:
None.
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM1Connection" ) 
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.Clear()                                                 ' Clear properties
    WScript.Echo objConnection.Device                                     ' Empty string ("") will be displayed

 GetDeviceCount function

Description:
Returns the number of installed Windows telephony devices on the local computer.
Parameters:
None.
Return value:
The number of installed Windows telephony devices. Check the LastError property to see if the function was completed successfully.

NOTE: The number of Windows telephony devices does not include direct COM ports (e.g. no "COM1:" etc.).

Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    WScript.Echo "Total #Windows telephony devices: " & objConnection.GetDeviceCount() ' Display total number oftelephony devices

 GetDevice function

Description:
Returns the n-th telephony device of the system. The number n can be between 0 and GetDeviceCount()-1.
Parameters:
Zero based index, to iterate over all telephony devices.
Return value:
The name of the device. Call the LastError function to see if the function was completed successfully.
The name of the device can be assigned to the Device property to open a Windows telephony device.

Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    n = objConnection.GetDeviceCount()                                    ' Set n to total number of telephony devices
    For i = 0 to n-1                                                      ' Iterate over all installed telephony devices
       WScript.Echo "Device " & i & ": " & objConnection.GetDevice( i )   ' Display device name
    Next
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    If( objConnection.GetDeviceCount() > 0 )
       objConnection.Device = objConnection.GetDevice( 0 )                ' Use the first telephony device
    End If

 EnterPin function

Description:
Enter the PIN code. Required for PIN protected SIM cards.
Parameters:
PIN code.
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    objConnection.EnterPin( "1234" )                                      ' Enter pincode: 1234
    ....
    objConnection.Connect()
    Next

 LoadProviderConfig function

Description:
Load provider specific information from an MM1 file.

ActiveXperts MMS Toolkit is shipped with over a hundred MM1 files, for various MMS providers all over the world. Each MM1 file contains MMS provider specific information. By passing such a file to the 'LoadProviderConfig' function, the following MM1Connection properties are automatically assigned:
Parameters:
A valid MM1 file
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
                                                                          ' Load an MM1 file
    WScript.Echo "ProviderAPN: " & objConnection.ProviderAPN              ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderAPNAccount: " & objConnection.ProviderAPNAccount     ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderAPNPassword: " & objConnection.ProviderAPNPassword   ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderWAPGateway: " & objConnection.ProviderWAPGateway     ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderMMSC: " & objConnection.ProviderMMSC             ' Display property assigned by LoadProviderConfig
    ....
    objConnection.Connect()                                               ' Connect now

 SaveProviderConfig function

Description:
Save provider specific information to an MM1 file.

You can save the following properties into an MM1 file: Use LoadProviderConfig to load an MM1 file into the above properties.
Parameters:
A MM1 file. A previous MM1 file will be overwritten automatically
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    ...
    objConnection.ProviderAPN         = "wap.o2.co.uk"                    ' Assign provider property
    objConnection.ProviderAPNAccount  = ""                                ' Assign provider property
    objConnection.ProviderAPNPassword = ""                                ' Assign provider property
    objConnection.ProviderWAPGateway  = "193.113.200.195"                 ' Assign provider property
    objConnection.ProviderMMSC        = "mmsc.mms.o2.co.uk:8002"          ' Assign provider property
    objConnection.SaveProviderConfig( "C:\My Providers\O2.mm1"            ' Save MM1 file

 Connect function

Description:
Connect to an MMS Service Center.
The following steps are taken under the hood:
  • A RRAS connection is established to the provider. To establish this connection, the provider's Access Point Name (APN) is required. Optionally, the APN login and password are required (only if the provider requires authentication);
  • When the RRAS connection is established, a dynamic IP address is assigned, for instance: 10.68.0.73;
  • The provider has a fixed WAP gateway address, for instance: 10.250.255.183. To allow access to this IP address, the routing entry is added to the local routing table, to tell that 10.250.255.183 should be routed via 10.68.0.73;
After a connection has been established, you can can call Send to send the MMS message. When you're ready, you should disconnect the session.
Parameters:
None.
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
                                                                          ' Load an MM1 file
    objConnection.Connect()                                               ' Connect now
	WScript.Echo "Connect, result: " & objConnection.LastError            ' Display the result of the Connect call now
	...
    objConnection.Disconnect()                                            ' Disconnect now

 Disconnect function

Description:
Disconnect from an MMS Service Center.
This function breaks the session that was established by the Connect function.
Parameters:
None.
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )      ' Create a new instance of MM1Connection
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
                                                                          ' Load an MM1 file
    objConnection.Connect()                                               ' Connect now
	WScript.Echo "Connect, result: " & objConnection.LastError            ' Display the result of the Connect call now
	...
    objConnection.Disconnect()                                             ' Disconnect now

 Send function

Description:
Sends a single MMS message to the MMS Service Center.
Parameters:
A MMS Message
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM1Connection" )     ' Create a new instance of MM1Connection
    Set objMessage    = CreateObject( "ActiveXperts.MMSMessage" )   
    Set objSlide      = CreateObject( "ActiveXperts.MMSSlide" )      
    ...
    objSlide.AddAttachment( "logo.gif" )                              
    objMessage.AddTo( "+4412345678" )                                    
    objMessage.AddSlide( objSlide )                                      
    ...
    objConnection.Device   = "Falcom SAMBA 75 GSM/GPRS Modem"             
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm1" )
                                                                          ' Load an MM1 file
    objConnection.Connect()                                               ' Connect now
    ...
    objConnection.Send ( objMessage )
    ...
    WScript.Echo "Send, result: " & objConnection.LastError               ' Display the result of the Connect call now
    ...
    objConnection.Disconnect()                                            ' Disconnect now

 GetErrorDescription function

Description:
Function to retrieve the explanation of an error code.
Parameters:
Error code.
Return value:
The Error string.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add a multimedia file
    WScript.Echo "LastError: " & objSlide.LastError & _                   ' Show the result of 'AddText'
                 objSlide.GetErrorDescription( objSlide.LastError )       ' Show the verbose result of 'AddText'
	



9. MM4Connection Object


9.1. MM4Connection Object - Introduction

The MM4Connection object provides functionality to connect to an MMS provider over an HTTP/SOAP connection and deliver an MMS message.
To be able to connect to an MMSC provider, you need a subscription to an MM4 compliant MMS provider.

The following sample demonstrates how to send an MMS message to a remote recipient using the MMSMessage object:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) ' Create a new instance of MM4Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
   
    ' MMS Connection: Set provider settings
    objConnection.ProviderHost        = "mmsc.o2.uk"                  ' Provider's hostname
    objConnection.ProviderPort        = 25                            ' Provider's TCP port
    objConnection.ProviderAccount     = "MM4"                         ' Provider login    (not required for all providers)
    objConnection.ProviderPassword    = "secret"                      ' Provider password (not required for all providers)
    
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )
The above ProviderXYZ properties all depend on the MMS provider you are connecting to. ActiveXperts has collected provider information for all major MMS providers all over the world. These properties are stored in so called MM4 files; these MM4 files are shipped with the product, and are located in: <install-dir>\Mmsc\mm4>. You can use a function 'LoadProviderConfig' to load all provider-depend information directly into the ProviderXYZ properties.

The following sample is similar to the above sample, but instead, LoadProviderConfig is used:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) ' Create a new instance of MM4Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
      
    ' MMS Connection: Load provider properties
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\mm4\United Kingdom\Vodafone.mm4" )
       
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )

9.2. MM4Connection Object - Overview of Properties and Functions

Property Type In/Out Mand/Opt Description
Version String Out n/a Product version number
ExpirationDate String Out n/a Product expiration date
ProviderHost String In/Out M Hostname or IP address used to connect
ProviderPort Number In/Out O TCP port used to connect
ProviderAccount String In/Out O Login used to connect to the provider
ProviderPassword String In/Out O Password used to connect to the provider
ProviderDomain String In/Out O Domain name used on the server
ProviderMM4Format Number In/Out O Select the MM4 format
ProviderMM4Version Number In/Out O Select the 3GPP protocol version
ProviderResponse String Out n/a Last response of the provider
LastError Number Out n/a Result of the last called function
LogFile String In/Out O All MM4 commands and responses are logged to this file

Function Description
Clear Clear all properties
LoadProviderConfig Load the provider properties from a config file
SaveProviderConfig Save the provider properties to a config file
Send Send the MMS message

9.3. MM4Connection Object - Properties


 Version property

Type:
String
Description:
Version information of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    WScript.Echo "Version: " & objConnection.Version                      ' Display version information

 ExpirationDate property

Type:
String
Description:
Expiration date of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Once you have registered the product, the property holds the empty string value.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    WScript.Echo "ExpirationDate: " & objConnection.ExpirationDate        ' Display expiration information        

 ProviderHost property

Type:
String
Description:
The Hostname or IP address of the MMS provider.
Instead of assigning ProviderHost directly, you can call LoadProviderConfig to set the property automatically, using a valid MM4 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    objConnection.ProviderHost = "mmsc.activexperts.com"                  ' Set the providers hostname
    objConnection.ProviderPort = 8025                                     ' Set the providers TCP port

 ProviderPort property

Type:
Number
Description:
The TCP port number to use to connect to the MMS provider, when not set, 25 is used by default.
Instead of assigning ProviderPort directly, you can call LoadProviderConfig to set the property automatically, using a valid MM4 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    objConnection.ProviderHost = "mmsc.activexperts.com"                  ' Set the providers hostname
    objConnection.ProviderPort = 8025                                     ' Set the providers TCP port

 ProviderAccount
 ProviderPassword properties


Type:
String
Description:
The login and password used to logon to the MM4 SMTP server. If a login and password is not required, you can leave these properties blank.
Instead of assigning ProviderAccount and ProviderPassword directly, you can call LoadProviderConfig to set the property automatically, using a valid MM4 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    objConnection.ProviderLogin    = "MM4 "                               ' login
    objConnection.ProviderPassword = "secret "                            ' password
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm4\Germany\T-Mobile.mm4"
    WScript.Echo objConnection.ProviderLogin                              ' Displays: 't-mobil'
    WScript.Echo objConnection.ProviderPassword                           ' Displays: 'mms'

 ProviderDomain property

Type:
String
Description:
The domainname used by the MMS provider.
Instead of assigning ProviderDomain directly, you can call LoadProviderConfig to set the property automatically, using a valid MM4 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )        ' Create a new instance of MM4Connection
    objConnection.ProviderHost   = "mmsc.activexperts.com"                  ' Set the providers hostname
    objConnection.ProviderPort   = 8025                                     ' Set the providers TCP port
    objConnection.ProviderDomain = "activexperts.com"                       ' Set the providers domainname

 ProviderMM4Format property

Type:
Number
Description:
The MM4 format sed by the provider. Possible values are:
  • asMMS_MM4FORMAT_MM4
  • asMMS_MM4FORMAT_SMTP
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM4Connection" )            ' Create a new MM4Connection instance
    Set objConstants    = CreateObject( "ActiveXperts.MMSConstants" )             ' Create a new MMSConstants instance
    ...
    objConnection.ProviderHost         = "mmsc.activexperts.com"                  ' Set the providers hostname
    objConnection.ProviderPort         = 8025                                     ' Set the providers TCP port
    objConnection.ProviderMM4Variation = objConstants.asMMS_MM4FORMAT_MM4         ' Use the 3GPP MM4 Protocol
    ...
    objConnection.Send ( objMessage )

 ProviderMM4Version property

Type:
Number
Description:
The 3GPP version used by the provider. Possible values are:
  • asMMS_VERSION_5_2_0
  • asMMS_VERSION_5_3_0
  • asMMS_VERSION_5_4_0
  • asMMS_VERSION_5_5_0
  • asMMS_VERSION_5_6_0
  • asMMS_VERSION_5_7_0
  • asMMS_VERSION_5_8_0
  • asMMS_VERSION_5_9_0
  • asMMS_VERSION_5_10_0
  • asMMS_VERSION_5_11_0
  • asMMS_VERSION_6_0_0
  • asMMS_VERSION_6_1_0
  • asMMS_VERSION_6_2_0
  • asMMS_VERSION_6_3_0
  • asMMS_VERSION_6_4_0
  • asMMS_VERSION_6_5_0
  • asMMS_VERSION_6_6_0
  • asMMS_VERSION_6_7_0
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM4Connection" )          ' Create a new MM4Connection instance
    Set objConstants    = CreateObject( "ActiveXperts.MMSConstants" )           ' Create a new MMSConstants instance
    ...
    objConnection.ProviderHost       = "mmsc.activexperts.com"                  ' Set the providers hostname
    objConnection.ProviderPort       = 8025                                     ' Set the providers TCP port
    objConnection.ProviderMM4Version = objConstants.asMMS_VERSION_5_2_0         ' MM4 Version
    ...
    objConnection.Send ( objMessage )

 ProviderResponse property

Type:
String
Description:
The last response of the MMSC provider server. The property is read-only; you cannot assign a value to it. The property can be very useful for troubleshooting purposes: when an MMS fails, this information probably explains exactly what went wrong.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) 
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )   
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      
  
    objSlide.AddAttachment( "logo.gif" )                              
    objMessage.AddTo( "+4412345678" )                                    
    objMessage.AddSlide( objSlide )                                      
    ...
    objConnection.LoadProviderConfig ( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\MM4\MyProvider.MM4" )
    ...
    objConnection.Send ( objMessage )
    WScript.Echo objConnection.ProviderResponse                            ' Show provider's last response

 LastError property

Type:
Number
Description:
The result of a previously called function. Should be used to check the result of your last function call. All functions (methods) store the result into the 'LastError' property. The property is read-only; you cannot assign a value to it.

For more information about error codes, click here.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) 
    ...
    objConnection.LoadProviderConfig ( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\MM4\MyProvider.MM4" )
    ...
    objConnection.Send ( objMessage )
    WScript.Echo objConnection.LastError                            ' Show provider's last response

 LogFile property

Type:
String
Description:
By default, LogFile holds the empty string and nothing is logged. If you assign a valid file name to it, all device commands and responses will be written to this log file.
Output is always appended.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) 
    ...
    objConnection.LogFile = "C:\MM4Log.txt"
    ...
    objConnection.Send ( objMessage )
    ...

9.4. MM4Connection Object - Functions


 Clear function

Description:
This function resets all Properties to their initial, default values.
Parameters:
None
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM4Connection" ) 
    ...
    objConnection.ProviderAccount   = "MM4"             
    objConnection.Clear()                                                 ' Clear properties
    WScript.Echo objConnection.ProviderAccount                            ' Empty string ("") will be displayed

 LoadProviderConfig function

Description:
Load provider specific information from an MM4 file.

Each MM4 file contains MMS provider specific information. By passing such a file to the 'LoadProviderConfig' function, the following MM4Connection properties are automatically assigned:
Parameters:
A valid MM4 file
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )        ' Create a new instance of MM1Connection
    ...
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\mm4\MyProvider.mm4" )
                                                                            ' Load an MM4 file
    WScript.Echo "ProviderHost: " & objConnection.ProviderHost              ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderPort: " & objConnection.ProviderPort              ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderAccount: " & objConnection.ProviderAccount        ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderPassword: " & objConnection.ProviderPassword      ' Display property assigned by LoadProviderConfig
    ....
    objConnection.Send ( objMessage )                                       ' Send now

 SaveProviderConfig function

Description:
Save provider specific information to an MM4 file.

You can save the following properties into an MM4 file:
Use LoadProviderConfig to load an MM4 file into the above properties.
Parameters:
A MM4 file. A previous MM4 file will be overwritten automatically
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    ...
    objConnection.ProviderHost        = "mmsc.o2.co.uk"                   ' Assign provider property
    objConnection.ProviderPort        = 8025                              ' Assign provider property
    objConnection.ProviderAccount     = "o2"                              ' Assign provider property
    objConnection.ProviderPassword    = "o2"                              ' Assign provider property
   
    objConnection.SaveProviderConfig( "C:\My Providers\O2.mm4"            ' Save MM4 file

 Send function

Description:
Sends out a MMS message created with the MMSMessage object.
Parameters:
A MMS Message
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM4Connection" )      ' Create a new instance of MM4Connection
    Set objMessage    = CreateObject( "ActiveXperts.MMSMessage" )    
    ...
    objMessage.LoadFromFile ( "C:\MyMessages\MyMMS.mms" )
    ...
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm4\United Kingdom\Vodafone.mm4" )
    ...                                                                   ' Load an MM4 file
    objConnection.Send ( objMessage )                                     ' Send the message
    WScript.Echo "Connect, result: " & objConnection.LastError            ' Display the result of the Send call now

 GetErrorDescription function

Description:
Function to retrieve the explanation of an error code.
Parameters:
Error code
Return value:
The Error string.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add a multimedia file
    WScript.Echo "LastError: " & objSlide.LastError & _                   ' Show the result of 'AddText'
                 objSlide.GetErrorDescription( objSlide.LastError )       ' Show the verbose result of 'AddText'
	



10. MM7Connection Object


10.1. MM7Connection Object - Introduction

The MM7Connection object provides functionality to connect to an MMS provider over an HTTP/SOAP connection and deliver an MMS message.
To be able to connect to an MMSC provider, you need a subscription to an MM7 compliant MMS provider.

The following sample demonstrates how to send an MMS message to a remote recipient using the MMSMessage object:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) ' Create a new instance of MM7Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
   
    ' MMS Connection: Set provider settings
    objConnection.ProviderURL         = "http://mmsc.o2.uk/mm7"       ' Provider's URL
    objConnection.ProviderAccount     = "mm7"                         ' Provider login    (not required for all providers)
    objConnection.ProviderPassword    = "secret"                      ' Provider password (not required for all providers)
    
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )
The above ProviderXYZ properties all depend on the MMS provider you are connecting to. ActiveXperts has collected provider information for all major MMS providers all over the world. These properties are stored in so called MM7 files; these MM7 files are shipped with the product, and are located in: <install-dir>\Mmsc\Mm7>. You can use a function 'LoadProviderConfig' to load all provider-depend information directly into the ProviderXYZ properties.

The following sample is similar to the above sample, but instead, LoadProviderConfig is used:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) ' Create a new instance of MM7Connection
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )    ' Create a new instance of MMSMessage
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      ' Create a new instance of MMSSlide
    Set objConstants  = CreateObject ( "ActiveXperts.MMSConstants" )  ' Create a new instance of MMSConstants
   
    ' MMSlide: Add duration, attachments(s) and text(s)
    objSlide.Clear()
    objSlide.Duration             = 10                                ' Display this screen for 10 seconds
    objSlide.AddAttachment( "logo.gif" )                              ' Add a multimedia attachment
    objSlide.AddText( "The ActiveXperts logo" )                       ' Add a description
  
    ' MMSMessage: Set properties
    objMessage.Clear()                                                ' Clear the message object (good practise)
    objMessage.Subject            = "My Message"                      ' Subject of the message
    objMessage.AddTo( "+4412345678" )                                 ' MMS recipient; phonenumbers and e-mail addresses allowed
    
    ' MMSMessage: Add slide
    objMessage.AddSlide( objSlide )                                   ' Add slide to the message; you can add multiple slides
      
    ' MMS Connection: Load provider properties
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm7\United Kingdom\Vodafone.mm7" )
       
    ' MMS Connection: Send the MMSMessage, including one or more slides
    objConnection.Send ( objMessage )

10.2. MM7Connection Object - Overview of Properties and Functions

Property Type In/Out Mand/Opt Description
Version String Out n/a Product version number
ExpirationDate String Out n/a Product expiration date
ProviderURL String In/Out M MMSC URL of the provider, where the SOAP data is send to
ProviderAccount String In/Out O Login used to connect to the provider
ProviderPassword String In/Out O Password used to connect to the provider
ProviderUseSSL Boolean In/Out O Access the URL through SSL
ProxyServer String In/Out O Use a proxy server
ProxyAccount String In/Out O Use this account for proxy authentication
ProxyPassword String In/Out O Use this password for proxy authentication
ProviderMM7Variation Number In/Out O Select the MM7 protocol variation
ProviderMM7Version Number In/Out O Select the MM7 protocol version
ProviderMM7Schema Number In/Out O Select the MM7 protocol XML schema
ProviderServiceCode String In/Out O Select VASP service code
ProviderVASID String In/Out O Select the VASID
ProviderVASPID String In/Out O Select the VASPID
ProviderResponse String Out n/a Last response of the provider
MessageID String Out n/a Message ID of the most recently sent MMS message
LastError Number Out n/a Result of the last called function
LogFile String In/Out O All MM7 commands and responses are logged to this file

Function Description
Clear Clear all properties
LoadProviderConfig Load the provider properties from a config file
SaveProviderConfig Save the provider properties to a config file
Send Send the MMS message

10.3. MM7Connection Object - Properties


 Version property

Type:
String
Description:
Version information of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    WScript.Echo "Version: " & objConnection.Version                      ' Display version information

 ExpirationDate property

Type:
String
Description:
Expiration date of MMS Toolkit. This property is read-only; you cannot assign a value to it.
Once you have registered the product, the property holds the empty string value.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    WScript.Echo "ExpirationDate: " & objConnection.ExpirationDate        ' Display expiration information        

 ProviderURL property

Type:
String
Description:
The URL of the MM7 interface on the MMS provider.
Instead of assigning ProviderURL directly, you can call LoadProviderConfig to set the property automatically, using a valid MM7 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    objConnection.ProviderURL = "http://mmsc.activexperts.com:8081/mm7"   ' Set the providers URL

 ProviderAccount
 ProviderPassword properties


Type:
String
Description:
The login and password used the access the URL. If a login and password is not required, you can leave these properties blank.
Instead of assigning ProviderAccount and ProviderPassword directly, you can call LoadProviderConfig to set the property automatically, using a valid MM7 file.
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    objConnection.ProviderLogin    = "mm7 "                               ' login
    objConnection.ProviderPassword = "secret "                            ' password
Example:
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\Germany\T-Mobile.mm7"
    WScript.Echo objConnection.ProviderLogin                              ' Displays: 't-mobil'
    WScript.Echo objConnection.ProviderPassword                           ' Displays: 'mms'

 ProviderUseSSL property

Type:
Boolean
Description:
Set this property to indicate that the Send function must access the page through SSL. Send discards the 'http://' and 'https://' prefixes, so setting the 'ProviderUseSSL' property is the only way to tell the MM7Connection object to use SSL.
Instead of assigning ProviderUseSSL directly, you can call LoadProviderConfig to set the property automatically, using a valid MM7 file.
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )    ' Create a new MM7Connection instance
    objConnection.ProviderHost   = "mmsc.activexperts-labs.com/mm7"       ' URL of the HTTP-POST provider
    objConnection.ProviderUseSSL = True                                   ' Use SSL, i.e. https:// instead of http://
    ...
    objConnection.Send ( objMessage )                                     ' Submit the MMS message using SSL

 ProxyServer, ProxyAccount, ProxyPassword properties

Description:
If your Internet configuration requires access to a proxy server, you must assign the host name or IP address of the proxy server to the 'ProxyServer' property. Optionally, if proxy authentication is required, assign the proxy authentication values to the 'ProxyAccount' and 'ProxyPassword' properties. The proxy properties are used by the Send function, so you must assign values to the proxy properties BEFORE calling the Send function.
Instead of assigning the ProxyServer, ProxyAccount and ProxyPassword properties directly, you can call LoadProviderConfig to set the property automatically, using a valid MM7 file.
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new MM7Connection instance
    objConnection.ProviderURL    = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProxyServer    = "proxy01.intranet.dom"                   ' Access through a proxy
    objConnection.ProxyAccount   = "mjackson"                               ' Proxy authentication required
    objConnection.ProxyPassword  = "mjackson1"                              ' Proxy authentication required
    ...
    objConnection.Send ( objMessage )

 ProviderMM7Variation property

Type:
Number
Description:
The MM7 variation used by the provider. Possible values are:
  • asMMS_MM7VARIATION_3GPP
  • asMMS_MM7VARIATION_ERICSSON
  • asMMS_MM7VARIATION_PAP
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )            ' Create a new MM7Connection instance
    Set objConstants    = CreateObject( "ActiveXperts.MMSConstants" )             ' Create a new MMSConstants instance
    ...
    objConnection.ProviderURL          = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderMM7Variation = objConstants.asMMS_MM7VARIATION_3GPP     ' Use the 3GPP MM7 Protocol
    ...
    objConnection.Send ( objMessage )

 ProviderMM7Version property

Type:
Number
Description:
The MM7 version used by the provider. Possible values are:
  • asMMS_VERSION_5_2_0
  • asMMS_VERSION_5_3_0
  • asMMS_VERSION_5_4_0
  • asMMS_VERSION_5_5_0
  • asMMS_VERSION_5_6_0
  • asMMS_VERSION_5_7_0
  • asMMS_VERSION_5_8_0
  • asMMS_VERSION_5_9_0
  • asMMS_VERSION_5_10_0
  • asMMS_VERSION_5_11_0
  • asMMS_VERSION_6_0_0
  • asMMS_VERSION_6_1_0
  • asMMS_VERSION_6_2_0
  • asMMS_VERSION_6_3_0
  • asMMS_VERSION_6_4_0
  • asMMS_VERSION_6_5_0
  • asMMS_VERSION_6_6_0
  • asMMS_VERSION_6_7_0
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )          ' Create a new MM7Connection instance
    Set objConstants    = CreateObject( "ActiveXperts.MMSConstants" )           ' Create a new MMSConstants instance
    ...
    objConnection.ProviderURL        = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderMM7Version = objConstants.asMMS_VERSION_5_2_0         ' MM7 Version
    ...
    objConnection.Send ( objMessage )

 ProviderMM7Schema property

Description:
The MM7 Schema used by the provider, possible values are:
  • asMMS_SCHEMA_REL5_MM7_1_0
  • asMMS_SCHEMA_REL5_MM7_1_1
  • asMMS_SCHEMA_REL5_MM7_1_2
  • asMMS_SCHEMA_REL5_MM7_1_3
  • asMMS_SCHEMA_REL5_MM7_1_4
  • asMMS_SCHEMA_REL5_MM7_1_5
  • asMMS_SCHEMA_REL6_MM7_1_0
  • asMMS_SCHEMA_REL6_MM7_1_1
  • asMMS_SCHEMA_REL6_MM7_1_2
  • asMMS_SCHEMA_REL5_MM7_1_3
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )         ' Create a new MM7Connection instance
    Set objConstants    = CreateObject( "ActiveXperts.MMSConstants" )          ' Create a new MMSConstants instance
    ...
    objConnection.ProviderURL       = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderMM7Schema = objConstants.asMMS_SCHEMA_REL5_MM7_1_1   ' MM7 XML Schema
    ...
    objConnection.Send ( objMessage )

 ProviderServiceCode property

Type:
String
Description:
A string that provides content provider-specific information for billing purposes. Do not set unless it is required by the provider.
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )           ' Create a new MM7Connection instance
    objConnection.ProviderURL         = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderServiceCode = "ActiveXperts"                           ' Servicecode
    ...
    objConnection.Send ( objMessage )

 ProviderVASID property

Description:
A string that identifies MMS application that is sending the messages(s). Do not set unless it is required by the provider.
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new MM7Connection instance
    objConnection.ProviderURL    = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderVASID  = "00186662"                               ' VASID
    ...
    objConnection.Send ( objMessage )

 ProviderVASPID property

Description:
A string that identifies the content provider. Do not set unless it is required by the provider.
Example:
    Set objConnection   = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new MM7Connection instance
    objConnection.ProviderURL    = "http://mmsc.activexperts.com:8081/mm7"  ' URL of the provider
    objConnection.ProviderVASPID = "MMS"                                    ' VASPID
    ...
    objConnection.Send ( objMessage )

 ProviderResponse property

Type:
String
Description:
The last response of the MMSC provider server. The property is read-only; you cannot assign a value to it. The property can be very useful for troubleshooting purposes: when an MMS fails, this information probably explains exactly what went wrong.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) 
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )   
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      
  
    objSlide.AddAttachment( "logo.gif" )                              
    objMessage.AddTo( "+4412345678" )                                    
    objMessage.AddSlide( objSlide )                                      
    ...
    objConnection.LoadProviderConfig ( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm7\MyProvider.mm7" )
    ...
    objConnection.Send ( objMessage )
    WScript.Echo objConnection.ProviderResponse                            ' Show provider's last response

 MessageID property

Type:
String
Description:
The Message ID of the most recently sent MMS message.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) 
    Set objMessage    = CreateObject ( "ActiveXperts.MMSMessage" )   
    Set objSlide      = CreateObject ( "ActiveXperts.MMSSlide" )      
  
    objSlide.AddAttachment( "logo.gif" )                              
    objMessage.AddTo( "+4412345678" )                                    
    objMessage.AddSlide( objSlide )                                      
    ...
    objConnection.LoadProviderConfig ( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm7\MyProvider.mm7" )
    ...
    objConnection.Send ( objMessage )
    
    WScript.Echo objConnection.MessageID                                    ' Message ID of the last message

 LastError property

Type:
Number
Description:
The result of a previously called function. Should be used to check the result of your last function call. All functions (methods) store the result into the 'LastError' property. The property is read-only; you cannot assign a value to it.

For more information about error codes, click here.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) 
    ...
    objConnection.LoadProviderConfig ( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm7\MyProvider.mm7" )
    ...
    objConnection.Send ( objMessage )
    WScript.Echo objConnection.LastError                            ' Show provider's last response

 LogFile property

Type:
String
Description:
By default, LogFile holds the empty string and nothing is logged. If you assign a valid file name to it, all device commands and responses will be written to this log file.
Output is always appended.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) 
    ...
    objConnection.LogFile = "C:\MMSLog.txt"
    ...
    objConnection.Send ( objMessage )
    ...

10.4. MM7Connection Object - Functions


 Clear function

Description:
This function resets all Properties to their initial, default values.
Parameters:
None
Return value:
Always 0. Check LastError property to see if the function was completed successfully.
Example:
    Set objConnection = CreateObject ( "ActiveXperts.MM7Connection" ) 
    ...
    objConnection.ProviderAccount   = "mm7"             
    objConnection.Clear()                                                 ' Clear properties
    WScript.Echo objConnection.ProviderAccount                            ' Empty string ("") will be displayed

 LoadProviderConfig function

Description:
Load provider specific information from an MM7 file.

Each MM7 file contains MMS provider specific information. By passing such a file to the 'LoadProviderConfig' function, the following MM7Connection properties are automatically assigned:
Parameters:
A valid MM7 file
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )        ' Create a new instance of MM1Connection
    ...
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm7\MyProvider.mm7" )
                                                                            ' Load an MM7 file
    WScript.Echo "ProviderURL: " & objConnection.ProviderURL                ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderAccount: " & objConnection.ProviderAccount        ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderPassword: " & objConnection.ProviderPassword      ' Display property assigned by LoadProviderConfig
    WScript.Echo "ProviderUseSSL: " & objConnection.ProviderUseSSL          ' Display property assigned by LoadProviderConfig
    ....
    objConnection.Send ( objMessage )                                       ' Send now

 SaveProviderConfig function

Description:
Save provider specific information to an MM7 file.

You can save the following properties into an MM7 file: Use LoadProviderConfig to load an MM7 file into the above properties.
Parameters:
A MM7 file. A previous MM7 file will be overwritten automatically
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM7Connection
    ...
    objConnection.Provider            = "http://mmsc.o2.co.uk/mm7"        ' Assign provider property
    objConnection.ProviderAccount     = "o2"                              ' Assign provider property
    objConnection.ProviderPassword    = "o2"                              ' Assign provider property
   
    objConnection.SaveProviderConfig( "C:\My Providers\O2.mm7"            ' Save MM7 file

 Send function

Description:
Sends out a MMS message created with the MMSMessage object.
Parameters:
A MMS Message
Return value:
Always 0. Check LastError property to see if the function was completed successfully
Example:
 
    Set objConnection = CreateObject( "ActiveXperts.MM7Connection" )      ' Create a new instance of MM1Connection
    Set objMessage    = CreateObject( "ActiveXperts.MMSMessage" )    
    ...
    objMessage.LoadFromFile ( "C:\MyMessages\MyMMS.mms" )
    ...
    objConnection.LoadProviderConfig( "C:\Program Files\ActiveXperts\MMS Toolkit\Mmsc\Mm1\United Kingdom\Vodafone.mm7" )
    ...                                                                   ' Load an MM7 file
    objConnection.Send ( objMessage )                                     ' Send the message
    WScript.Echo "Connect, result: " & objConnection.LastError            ' Display the result of the Send call now

 GetErrorDescription function

Description:
Function to retrieve the explanation of an error code.
Parameters:
Error code
Return value:
The Error string.
Example:
    Set objSlide           = CreateObject ( "ActiveXperts.MMSSlide" )     ' Create a new MMSSlide instance
    objSlide.AddAttachment( "C:\Temp\File1.jpg" )                         ' Add a multimedia file
    WScript.Echo "LastError: " & objSlide.LastError & _                   ' Show the result of 'AddText'
                 objSlide.GetErrorDescription( objSlide.LastError )       ' Show the verbose result of 'AddText'
	



11. Samples

Samples for Visual Basic, Visual Basic .NET, Visual C++, Visual C# .NET, ASP and VBScript are included as part of the installation. You can also find the samples on our ftp site at ftp://ftp.activexperts-labs.com/samples/ammstool/.



12. Troubleshooting

12.1. FAQ's

Visit our website for a complete list of FAQ's at:
    http://www.activexperts.com/support

12.2. Contact us

Please contact our website for support questions about this product, or send an email to our support-staff:

Website: http://www.activexperts.com/support
Email: support@activexperts.com



13. Purchase and Product Activation

13.1. Purchase

Please visit www.activexperts.com/sales to buy the product. Here, you can also find the latest prices.

You can also contact us via email: sales@activexperts.com

After you purchase the product, you will receive your product registration key.

13.2. Product Activation

After you purchase the product, you will receive a registration code. This code must be entered in the registry on your machine(s). There are three ways to accomplish this:


1. Automatic installation

The MMS Toolkit automatic installation performs all necessary steps to install and register the component. It will ask for the registration code during installation and will enter the registration code in the registry.


2. 'Activate' function

You can use the Activate function of any of the objects:, for instance

   Set objConnection = CreateObject("ActiveXperts.MM1Connection")
   objConnection.Activate "<your registrationkey>"
If you prefer, you can also use the Activate function of the MM1Connection or MM7Connection objects.
The Activate function of any of the objects writes the following entry to the registry, which will actually activate the product:
    Key: HKEY_LOCAL_MACHINE\Software\ActiveXperts\MMS Toolkit\RegistrationKey  Type: REG_SZ  Value: XXXXX-XXXXX-XXXXX
where 'XXXXX-XXXXX-XXXXX' is the registration code issued to you.


3. Manually insert code in the registry

You can activate the product by editing the registry manually:



Appendix A - License Agreement

PLEASE READ THIS SOFTWARE LICENSE AGREEMENT CAREFULLY BEFORE 
DOWNLOADING OR USING THE SOFTWARE.  BY CLICKING ON THE 
"ACCEPT" BUTTON, OPENING THE PACKAGE, DOWNLOADING THE PRODUCT, 
OR USING THE EQUIPMENT THAT CONTAINS THIS PRODUCT, YOU ARE 
CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE 
TO ALL OF THE TERMS OF THIS AGREEMENT, CLICK THE "DO NOT 
ACCEPT" BUTTON AND THE INSTALLATION PROCESS WILL NOT CONTINUE, 
RETURN THE PRODUCT TO THE PLACE OF PURCHASE FOR A FULL REFUND, 
OR DO NOT DOWNLOAD THE PRODUCT.

GENERAL
In this Software License Agreement:
(i) "ActiveXperts" means ActiveXperts Software B.V.
(ii) "Customer" means the individual(s), organization or business entity 
buying a license of the Software from ActiveXperts or its Distributors 
or its Resellers.
(iii) "Software" means computer programs (and their storage medium) 
supplied by ActiveXperts and known collectively as "MMS Toolkit" 
in which ActiveXperts has property rights and any user manuals, 
operating instructions, brochures and all other documentation relating 
to the said computer programs (the expression "Software" to include all 
or any part or any combination of Software).

1. LICENSE GRANT
ActiveXperts grants Customer the following rights provided that you 
comply with all terms and conditions of this License Agreement:

(a) Installation and use. Customer may install, use, access, display and 
run one copy of the Software on a single computer, such as a 
workstation, terminal or other device ("Workstation Computer"). A 
"License Pack" allows you to install, use, access, display and run 
additional copies of the Software up to the number of "Licensed Copies" 
specified above.

(b) Reservation of Rights. ActiveXperts reserves all rights not 
expressly granted to you in this License Agreement.

2. UPGRADES AND SUPPLEMENTS
To use a product identified as an upgrade, you must first be licensed 
for the Software as eligible for the upgrade. After upgrading, Customer 
may no longer use the product that formed the basis for Customer's 
upgrade eligibility.

This License Agreement applies to updates or supplements to the original 
Software provided by ActiveXperts, unless we provide other terms along 
with the update or supplement.

3. LIMITATION ON REVERSE ENGINEERING,DECOMPILATION, AND DISASSEMBLY
Customer may not reverse engineer, decompile, or disassemble the 
Software, except and only to the extent that it is expressly permitted 
by applicable law notwithstanding this limitation.

4. TERMINATION
Without prejudice to any other rights, ActiveXperts may cancel this 
License Agreement if Customer does not abide by the terms and conditions 
of this License Agreement, in which case you must destroy all copies of 
the Software and all of its component parts.

5. NOT FOR RESALE SOFTWARE
Software identified as "Not for Resale" or "NFR," may not be resold, 
transferred or used for any purpose other than demonstration, test or 
evaluation.

6. LIMITED WARRANTY
ActiveXperts warrants that for a period of ninety (90) days from the 
date of shipment from ActiveXperts: (i) the media on which the Software 
is furnished will be free of defects in materials and workmanship under 
normal use; and (ii) the Software substantially conforms to its 
published specifications. Except for the foregoing, the Software is 
provided AS IS. This limited warranty extends only to Customer as the 
original licensee. Customer's exclusive remedy and the entire liability 
of ActiveXperts and its suppliers under this limited warranty will be, 
at ActiveXperts or its service center's option, repair, replacement, or 
refund of the Software if reported (or, upon request, returned) to the 
party supplying the Software to Customer. In no event does ActiveXperts 
warrant that the Software is error free or that Customer will be able to 
operate the Software without problems or interruptions.
This warranty does not apply if the software (a) has been altered, 
except by ActiveXperts, (b) has not been installed, operated, repaired, 
or maintained in accordance with instructions supplied by ActiveXperts, 
(c) has been subjected to abnormal physical or electrical stress, 
misuse, negligence, or accident, or (d) is used in ultrahazardous 
activities.


7. LIMITATION OF LIABILITY AND REMEDIES.
Notwithstanding any damages that you might incur for any reason 
whatsoever (including, without limitation, all damages referenced above 
and all direct or general damages), the entire liability of ActiveXperts 
and any of its suppliers under any provision of this License Agreement 
and your exclusive remedy for all of the foregoing (except for any 
remedy of repair or replacement elected by ActiveXperts with respect to 
any breach of the Limited Warranty) shall be limited to the greater of 
the amount actually paid by you for the Software or U.S.$5.00. The 
foregoing limitations, exclusions and disclaimers (including Sections 4, 
5 and 6 above) shall apply to the maximum extent permitted by applicable 
law, even if any remedy fails its essential purpose.

8. ENTIRE AGREEMENT

This License Agreement (including any addendum or amendment to this 
License Agreements which is included with the Software) are the entire 
agreement between you and ActiveXperts relating to the Software and the 
support services (if any) and they supersede all prior or 
contemporaneous oral or written communications, proposals and 
representations with respect to the Software or any other subject matter 
covered by this License Agreement. To the extent the terms of any 
ActiveXperts policies or programs for support services conflict with the 
terms of this License Agreement, the terms of this License Agreement 
shall control.

This Agreement shall be construed in accordance with the laws of The 
Netherlands and the Dutch courts shall have sole jurisdiction in any 
dispute relating to these conditions. If any part of these conditions 
shall be or become invalid or unenforceable in any way and to any extent 
by any existing or future rule of law, order, statute or regulation 
applicable thereto, then the same shall to the extent of such invalidity 
or enforceability be deemed to have been deleted from the conditions 
which shall remain in full force and effect as regards all other 
provisions.

9. Copyright
The Software is protected by copyright and other intellectual property 
laws and treaties. ActiveXperts or its suppliers own the title, 
copyright, and other intellectual property rights in the Software. The 
Software is licensed, not sold.