Struct for storing port information in BarcodeReader.GetPortInfo.
Namespace: Honeywell.Mobility.DataCollection
Assembly: Honeywell.Mobility.DataCollection.FF3.5 (in Honeywell.Mobility.DataCollection.FF3.5.dll)
[C#]
public struct PortInfo
[Visual Basic (Declaration)]
Public Structure PortInfo
[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(); bcr.GetPortInfo(bcr.portInfoArray); for (int i = 0; i < bcr.portInfoArray.Length; i++) { this.listBox1.Items.Add("portId = " + bcr.portInfoArray[i].PortId); this.listBox1.Items.Add("DeviceType = " + bcr.portInfoArray[i].PortDeviceType); this.listBox1.Items.Add("PortName = " + bcr.portInfoArray[i].PortName); this.listBox1.Items.Add("StateID = " + bcr.portInfoArray[i].PortStateID); this.listBox1.Items.Add("PortState = " + bcr.portInfoArray[i].strPortState); } } 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() bcr.GetPortInfo(bcr.portInfoArray) For Each myPort As BarcodeReader.PortInfo In bcr.portInfoArray ListBox1.Items.Add("portId = " + myPort.PortId.ToString()) ListBox1.Items.Add("DeviceType = " + myPort.PortDeviceType) ListBox1.Items.Add("PortName = " + myPort.PortName) ListBox1.Items.Add("StateID = " + myPort.PortStateID.ToString()) ListBox1.Items.Add("PortState = " + myPort.strPortState) Next Catch bcrexp As BarcodeReaderException MessageBox.Show(bcrexp.Message) End Try End Sub
End Class