MagneticStripeReaderErrorOccured

当磁条读取器 (MSR) 错误(例如扫描错误)时,会发生此事件。

语法

typedef struct _MSR_ERROR_EVENT
{
    PosEventDataHeader Header;
    MsrTrackErrorType Track1Status;
    MsrTrackErrorType Track2Status;
    MsrTrackErrorType Track3Status;
    MsrTrackErrorType Track4Status;
    UnifiedPosErrorSeverity Severity;
    UnifiedPosErrorReason Reason;
    UINT32 ExtendedReason;
    MSR_DATA_RECEIVED CardData;
    wchar_t Message[MSR_ERROR_MAX_MESSAGE_LENGTH];
} MSR_ERROR_EVENT, *PMSR_ERROR_EVENT;

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

内存值 说明
0x00000009 EventType = PosEventType:: MagneticStripeReaderErrorOccurred
UINT32 DataLength = sizeof (PosEventDataHeader) + sizeof (MSR_ERROR_EVENT)
32 位 MsrTrackErrorType Track1Status
32 位 MsrTrackErrorType Track2Status
32 位 MsrTrackErrorType Track3Status
32 位 MsrTrackErrorType Track4Status
32 位 UnifiedPosErrorSeverity 严重性
32 位 UnifiedPosErrorReason 原因
UINT32 扩展原因
32 位 MsrCardType CardType
unsigned char Track1EncryptedDataLength
unsigned char Track2EncryptedDataLength
unsigned char Track3EncryptedDataLength
unsigned char Track4EncryptedDataLength
unsigned char [MSR_TRACK_SIZE] Track1EncryptedDataLength 字节的加密跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2EncryptedDataLength 字节的加密轨道 2 数据
unsigned char [MSR_TRACK_SIZE] Track3EncryptedDataLength 字节的加密跟踪 3 数据
unsigned char [MSR_TRACK_SIZE] Track4EncryptedDataLength bytes of encrypted track 4 data
unsigned char Track1MaskedDataLength
unsigned char Track2MaskedDataLength
unsigned char Track3MaskedDataLength
unsigned char Track4MaskedDataLength
unsigned char [MSR_TRACK_SIZE] Track1MaskedDataLength 字节的掩码跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2MaskedDataLength 字节的掩码跟踪 2 数据
unsigned char [MSR_TRACK_SIZE] Track3MaskedDataLength 字节的掩码跟踪 3 数据
unsigned char [MSR_TRACK_SIZE] Track4MaskedDataLength 字节的掩码跟踪 4 数据
unsigned char Track1DiscretionaryDataLength
unsigned char Track2DiscretionaryDataLength
unsigned char [MSR_TRACK_SIZE] Track1DiscretionaryDataLength 字节的任意跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2DiscretionaryDataLength bytes of discretionary track 2 data
unsigned char CardAuthenicationDataLength - 加密后的数据长度,包括填充
unsigned char CardAuthenticationDataAbsoluteLength - 在解密期间可能需要加密 (之前的数据长度,以条带填充)
unsigned char[MSR_ADDITIONAL_SECURITY_INFORMATION_DATA_SIZE] CardAuthenticationDataAbsoluteLength 字节卡身份验证数据
unsigned char AdditionalSecurityInformationLength
unsigned char[MSR_ADDITIONAL_SECURITY_INFORMATION_SIZE] AdditionalSecurityInformationLength 字节的其他安全信息
wchar_T [MSR_ERROR_MAX_MESSAGE_LENGTH] 最多 MSR_ERROR_MAX_MESSAGE_LENGTH wchar_t以 Null 结尾的错误消息文本

注解

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

要求

标头: pointofservicedriverinterface.h