共用方式為


PosBarcodeScannerErrorOccurredEventData 結構 (pointofservicedriverinterface.h)

這個結構包含傳遞至 BarcodeScannerErrorOccurred 事件的錯誤數據。

語法

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

成員

Header

PosEventDataHeader 結構,描述 PosBarcodeScannerErrorOccurredEventData 結構的記憶體數量,以及尾端錯誤訊息和掃描數據。

IsRetriable

指出是否可以再次呼叫 ReadFile 來讀取此事件

Severity

UnifiedPosErrorSeverity 列舉中包含值,指出錯誤的嚴重性。

VendorErrorCode

包含廠商特定的錯誤碼。

Reason

包含 UnifiedPosErrorReason 列舉中的值,指出錯誤的原因。

ExtendedReason

包含錯誤原因的其他數據。

MessageLength

表示錯誤訊息的長度,以位元組為單位。

PartialData

如果發生掃描錯誤,而且已取得某些掃描數據,則會在此參數中使用部分掃描數據。

備註

錯誤數據應該會填滿緩衝區,如下表所示, (順序) 。

資料 以位元組為單位的長度
PosBarcodeScannerErrorOccurredEventData 結構 sizeof (PosBarcodeScannerErrorOccurredEventData)
錯誤訊息文字 MessageLength
部分掃描數據 PartialData.ScanDataLength
標籤資料 PartialData.ScanDataLabelLength

規格需求

需求
標頭 pointofservicedriverinterface.h (include PointOfServiceDriverInterface.h)