3-17 GetTrack1
This function returns MSR Track1 data. If the MSR is in read mode and ERROR code is
returned, the card has not yet been read by the MSR. Strip the card with the MSR again.
MSRReadCancel function can be used to cancel read mode.
long GetTrack1 (TCHAR* tcData, UINT dwLen);
[Parameters]
* TCHAR tcData
[in, out] MSR Track1 data will be returned
* UINT dwLen
[in, out] MSR Track1 data length will be returned
[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;
TCHAR Track [200];
memset(Track, 0, sizeof(Track));
lResult = GetTrack1(Track, sizeof(Track));
if (lResult != BXL_SUCCESS)
……
else
……
……