3-12 MsrReadTrack
This function recalls MSR data. If the MSR is in read mode and BXL_MSR_DATAEMPTY
is returned, the card has not yet been read in the MSR. Scanning the card in the MSR
again can be tried, or the MSRReadCancel function can be used to cancel read mode.
Long MsrReadTrack (
PCHAR Data1,
PCHAR Data2,
PCHAR Data3
);
[Parameters]
* PCHAR Data1
[in, out] MSR Data Track 1 read from the buffer defined by the caller.
* PCHAR Data2
[in, out] MSR Data Track 2 read from the buffer defined by the caller.
* PCHAR Data3
[in, out] MSR Data Track 3 read from the buffer defined by the caller.
[Return Values]
Returns after function success
Unable to open communication port
long lResult;
lResult = PrinterOpen(“portinfo…”, 1000);
……
MsrReadReady();
if (GetStat() != BXL_STS_MSR_READY)
return;
char Track1[200];
char Track2[200];
char Track3[200];
memset(Track1, 0, sizeof(Track1));
memset(Track2, 0, sizeof(Track2));
memset(Track3, 0, sizeof(Track3));
lResult = MsrReadTrack(Track1, Track2, Track3);
if (lResult != BXL_SUCCESS)
……
else
……
……