ActiveX in Visual Basic

Q: Do you have some example in VB of the GSM ActiveX, also I would like to know if I can put several instances of the control in my program and if can distribute the aplication legaly, thank you in advance.

A: There is GSMClientX.xls that demonstrates using of GSMX component in VBA. It's very similar to VB. You can put more instances in program. It's you need distribute custom application you must have deploy registration key that is not dependent on machine where is running.

Example how to pull messages from modem:

Public Sub ReadAllSMS()
  Dim I, J As Integer
  Dim Sg As IStrings2
  Dim S As String
  Dim Stat As Long

If GSMX.Equipment = eqM20 Or GSMX.Equipment = eqNokia9110 Or GSMX.Equipment = eqWaveCom Or GSMX.Equipment = eqFasttrack Then Set Sg = GSMX.GetSMSList(4) Else Set Sg = GSMX.GetSMSList(-1) End If

For I = 0 To Sg.Count - 1 J = Val(Sg.Item(I)) Set SMS = Sg.Objects(I) If (SMS Is Nothing) Then Set SMS = GSMX.ReadSMS(J, Stat) End If On Error GoTo Finally1 If Stat = 0 Then ' unread LogSMS (SMS) End If GSMX.DeleteSMS J Finally1: Next I End Sub