Headwind SMS software products

About | Contact us

 
 

COM interface

The COM (Component Object Model) interface was designed in order to allow Windows applications to access the GSM modem, send and receive SMS and WAP Push messages. All SMS API classes are accessible from .NET languages (VB.NET, C# and others). Our .NET SMS API is free to use (you need to install Headwind GSM Modem Driver first).

As a real application of this SMS API, you can look on the Headwind SMS Outlook Add-In. The COM SMS API may be used even in PHP (only on the Windows server), click here for a PHP SMS example.

The example of a client written in VB.NET is included in the distributive of Headwind GSM Modem Driver, it can be found in the program menu. If you have some questions on using API or developing some SMS application, do not hesitate to contact us.

COM library name:

  • HeadwindGSM

COM classes:

  • SMSDriver - main class, allowing to setup and connect the GSM modem;
  • SMSHandler - SMS handler, which may be used to receive SMS from Headwind GSM modem driver;
  • SMSMemory - class for the access to the GSM modem memory;
  • SMSMessage - SMS/Push message class;
  • USSDRequest - USSD request class.

All classes implement dual interfaces and support error info using the interface ISupportErrorInfo.

A simple example

Public Class client
    Dim drv As Object
    Dim msg As Object
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Headwind GSM Driver class
        drv = CreateObject("HeadwindGSM.SMSDriver")
        ' Port name
        drv.PortName = "COM5"
        ' Connect to the modem
        drv.Connect()
        ' Message object
        msg = CreateObject("HeadwindGSM.SMSMessage")
        ' Recipient number
        msg.To = "79214432123"
        ' Message body
        msg.Body = "Hello from VB Client!"
        ' Send message
        msg.Send()
    Exit Sub
End Class