IsConnected Property

Description:

If IsConnected property returns True, it means that mCore™ is currently using (exclusively) the serial port specified in the property 'Port'.

   

Usage blnIsConnected = ObjectName.IsConnected
Value Type Boolean
Access Mode Read
Valid Values
  • True - mCore™ is using the serial port
  • False - mCore™ is not using the serial port
Remarks It is not necessary to have called the Connect function explicitly to use the serial port. For all properties and methods that require mCore™ to connect to the modem, calls the Connect method internally automatically. This will also result in value of property IsConnected to be returned as True.

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS
Set objSMS = New mCore.SMS
' You can also use Set objSMS = CreateObject("mCore.SMS")
' In case of ASP (VBScript) to create object use
' Set objSMS = Server.CreateObject("mCore.SMS")
' In ASP use Response.Write instead of MsgBox
objSMS.Port = "COM2"
objSMS.BaudRate = 57600
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
If objSMS.Connect Then
     MsgBox objSMS.IsConnected
     MsgBox "Connected Successfully!"
     objSMS.Disconnect
Else
     MsgBox "Error " & CStr(objSMS.ErrorCode) & _
            ": " & objSMS.ErrorDescription
End If
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved