wooi83

wooi83

  • NA
  • 18
  • 0

sending sms

Apr 10 2004 12:55 PM
using System; using ASMSCTRLLib; <---- can someone tell me y this namespace are not found and unable to compile? namespace ConsoleApplication1 { /// /// Summary description for Class1. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { SMSC objSMSC; objSMSC = new SMSC(); objSMSC.Device = "Standard 19200 bps Modem"; objSMSC.Recipient = "31624896641"; // to 0624896641 in the Netherlands (+31) objSMSC.MessageText = "Hello, world"; objSMSC.LogFile = "c:\\smslog.txt"; // Trace log to see what's going on Console.Write( "Sending the message...\n" ); objSMSC.SendMessage( 0 ); // 0 means: through GSM phone or SMS device if( objSMSC.LastError != 0 ) { Console.WriteLine( "Failed to send message, error: " ); Console.WriteLine( objSMSC.GetErrorDescription( objSMSC.LastError ) + "\n" ); } else { Console.WriteLine( "Message successfully delivered\n" ); } Console.WriteLine( "Ready." ); } } }

Answers (2)