Scanner Class
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Usage
'Usage
Dim scanner1 As New Scanner()
Syntax
'Declaration
MustInherit Public Class Scanner
Inherits PosCommon
public abstract class Scanner : PosCommon
public abstract ref class Scanner : public PosCommon
public abstract class Scanner extends PosCommon
public abstract class Scanner extends PosCommon
Remarks
The Scanner device reads encoded data from a label.
The Scanner class follows the general programming model for event-driven input:
When input is received by the service object, it queues a DataEvent.
If the AutoDisable property is TRUE, the service object disables itself when a DataEvent is queued.
A queued DataEvent can be delivered to the application when the DataEventEnabled property is TRUE. Just before delivering this event, the service object copies the data into properties and disables further data events by setting the DataEventEnabled property to FALSE. Subsequent input data is queued by the service object while the application processes the current input and associated properties. When the application has finished the current input and is ready for more data, it should enable events by setting DataEventEnabled to TRUE.
One or more ErrorEvent events will be queued if the service object encounters an error while gathering or processing input. Those events will be delivered to the application when the DataEventEnabled property is TRUE.
The application can read the DataCount property to obtain the number of DataEvent events queued by the service object.
The application can delete all input queued by the service object by calling the ClearInput method.
The service object places scanned data in the ScanData property. If the application sets the DecodeData property to TRUE, the service object decodes the data and places it in the ScanDataLabel and ScanDataType properties.
The scanner is an exclusive-use device. Therefore:
The application must claim the device before enabling it.
The application must claim and enable the device before the device begins reading input.
Inheritance Hierarchy
System.Object
Microsoft.PointOfService.PosDevice
Microsoft.PointOfService.PosCommon
Microsoft.PointOfService.Scanner
Microsoft.PointOfService.BasicServiceObjects.ScannerBasic
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000