BarcodeScannerErrorOccurred

出现错误(例如扫描错误)时,将发生此事件。 此事件的数据缓冲区如下所示。

语法

// Error occurred data should fill the ReadFile buffer in this order:
//    PosBarcodeScannerErrorOccurredEventData structure (length = sizeof(PosBarcodeScannerErrorOccurredEventData))
//    Error Message (length = MessageLength)
//    Scan Data (length = ScanDataLength)
//    Scan Data Label (length = ScanDataLabelLength)

typedef struct _PosBarcodeScannerErrorOccurredEventData
{
    PosEventDataHeader Header;
    LONG IsRetriable;
    UnifiedPosErrorSeverity Severity;
    UINT32 VendorErrorCode;
    UnifiedPosErrorReason Reason;
    UINT32 ExtendedReason;
    UINT32 MessageLength;
    PosBarcodeScannerDataReceivedEventData PartialData;
} PosBarcodeScannerErrorOccurredEventData;

下表显示了此事件的数据缓冲区的内存布局。

内存值 说明
0x00000006 EventType = PosEventType:: BarcodeScannerTriggerPressed
UINT32 DataLength = sizeof (PosBarcodeScannerErrorOccurredData) + MessageLength + ScanDataLength + ScanDataLabelLength)
BOOL IsRetriable
32 位 UnifiedPosErrorSeverity 严重性
UINT32 VendorErrorCode
32 位 UnifiedPosErrorReason 原因
UINT32 ExtendedReason
UINT32 MessageLength
PosBarcodeScannerDataReceivedEventData PartialData
UINT32 未指定 EventType
UINT32 DataLength = sizeof (PosBarcodeScannerDataRecievedEventData) + MessageLength + ScanDataLength + ScanDataLabelLength)
UINT32 未指定 DataType
UINT32 ScanDataLength
UINT32 ScanDataLabelLength
byte [] MessageLength 字节的消息
byte [] ScanDataLength 字节的标签数据
byte [] ScanDataLabelLength 字节的扫描数据

备注

如果发生扫描错误,并且获取了某些扫描数据,则事件数据将包含部分扫描数据。

要求

标头: pointofservicedriverinterface.h