gsmcomm help

  • 12 years ago

    hi everyone, i dont know if this is the right place for this question, but here goes.  im writing a program to send text messages using the gsmcomm library.  is there a way to check the status of a sent text message (ie, was the msg sent, was it recieved, if not sent why).  if so, can i have some examples?

    heres what i have so far:

    [CODE]Imports System.Data.OleDb

    Imports System

    Imports System.Data

    Imports System.Data.SqlClient

    Imports GsmComm.GsmCommunication

    Imports GsmComm.PduConverter

    Imports System.IO.Ports

    Module Module2

    Private WithEvents comm As GsmCommMain

    Private Delegate Sub SetTextCallback(ByVal text As String)


    Public Sub SendPCVMsg(ByRef PCVNum, ByRef msg)

    'programatically get com port number

    Try


    comm = New GsmCommMain(6)

    comm.Open()

    Dim pdu As SmsSubmitPdu = New SmsSubmitPdu(msg, "71665958")

    comm.SendMessage(pdu)

    Catch ex As Exception

    If ex.Message = "Message service error 500" Then

    MsgBox("this is not a cell number")

    ElseIf ex.Message = "Unable to open port COM6: Invalid connection settings. Port COM6 does not exist on this system." Then

    MsgBox("Check to make sure the modem is plugged in")

    Else

    MsgBox("Error: " + ex.Message + " (" + ex.GetType().ToString() + ")")

    Debug.Print(ex.Message)

    End If


    End Try

    End Sub

    End Module[/CODE]
     

    so far it works.  i just want to cover all my bases

     

    thanks

    jason

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“You can stand on the shoulders of giants OR a big enough pile of dwarfs, works either way.”