SMS application in C#

About | Contact us


Sending SMS in C#

Download example!

To be able to send and receive SMS in C#, you can use COM interface of Headwind GSM Modem Driver. For that purpose, you need to add link to a COM library::

  • In "Project Explorer", click "References" by right mouse button, then select "Add reference";
  • Open the "COM" tab in the popup window;
  • Find and select Headwind GSM 1.0 Type Library.

The connection with a modem is done via the object HeadwindGSM.SMSDriver. SMS messages are sent by using method Send() of HeadwindGSM.SMSMessage. To trace the status of the message, you can use SendAndTrace() method which gets an object of HeadwindGSM.SMSDriver class and raises its events when the status is changed.

SMS messages are received by an object of HeadwindGSM.SMSHandler class. This object gets the received SMS events from Headwind GSM Modem Driver and raises the C# events. It is necessary to use the mechanism of delegates (see example) to process SMS messages correctly.