3-12 MSRReadTrack
This function retrieves the MSR data. If the MSR is in the Read Mode and
BXL_MSR_DATAEMPTY is returned, it means the card has not been read by the MSR. In
this case, scan the card with the MSR or use MSRReadCancel to deactivate the Read
Mode.
Int32 MSRReadTrack (ref byte[] Data1, ref byte[] Data2, ref byte[] Data3);
[Parameters]
* ref byte[] Data1
[in, out] Retrieves MSR Data Track 1 to the buffer defined by the caller.
* ref byte[] Data2
[out, out] Retrieves MSR Data Track 2 to the buffer defined by the caller.
* ref byte[] Data3
[out, out] Retrieves MSR Data Track 3 to the buffer defined by the caller.
[Return Values]
BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK();
……
Task<Int32> task = bxlPrinter.MSRReadReadyAsync();
await task;
if (BXL_SUCCESS != task.Result)
return;
byte[] track1 = new byte[120];
byte[] track2 = new byte[120];
byte[] track3 = new byte[120];
Int32 ret = bxlPrinter.MSRReadTrack(ref track1, ref track2, ref track3);
if (BXL_MSR_DATAEMPTY == ret)
……
else
……