Gets the port state by port ID.
Namespace: Honeywell.Mobility.DataCollection
Assembly: Honeywell.Mobility.DataCollection.FF3.5 (in Honeywell.Mobility.DataCollection.FF3.5.dll)
[C#]
public int GetPortState( int portID, ref int stateID, ref string portState )
[Visual Basic (Declaration)]
Public Function GetPortState ( _ portID As Integer, _ ByRef stateID As Integer, _ ByRef portState As String _ ) As Integer
portID
Type: System.Int32
Port ID.
stateID
Type: System.Int32
Port state ID.
portState
Type: System.String
String description of the port state.
Returns zero if successful.
[C#] using Honeywell.Mobility.DataCollection; namespace DataCollection { public partial class frmBarcodeReader : Form { private Honeywell.Mobility.DataCollection.BarcodeReader bcr; public frmBarcodeReader() { InitializeComponent(); try { bcr = new Honeywell.Mobility.DataCollection.BarcodeReader(); int stateID = 0; string PortState = string.Empty; bcr.GetPortState(1, ref stateID, ref PortState); } catch (BarcodeReaderException bcrexp) { MessageBox.Show(bcrexp.Message); } } } }
[VB.NET] Imports Honeywell.Mobility.DataCollection Public Class BarcodeReader Private WithEvents bcr As Honeywell.Mobility.DataCollection.BarcodeReader Private Sub BarcodeReader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try bcr = New BarcodeReader() Dim stateID As Integer Dim PortState As String = Nothing bcr.GetPortState(1, stateID, PortState) Catch bcrexp As BarcodeReaderException MessageBox.Show(bcrexp.Message) End Try End Sub End Class
BarcodeReaderException throws an exception when an error has occurred on bar code read methods and properties.