4. Message
If some events have occurred in printer, the SDK will send WM_MSR_ARRIVED
(WM_USER+3) message.
4-1 BXL_LPARAM _MSR
This message will be posted when the printer reads MSR Track data from MSR sensor.
lParam
lParam is set by the following data.
long lResult;
lResult = PrinterOpen(“portinfo…”, 1000);
……
SetMsrMsgMode(TRUE);
……
MSG message;
int i = 0;
memset(&message, 0, sizeof(message));
for (i = 0; i < 10; i++)
{
if (PeekMessage(&message, NULL, WM_MSR_ARRIVED, WM_MSR_ARRIVED,
PM_REMOVE))
{
if (message.lParam & BXL_MSG_TRACK1)
// read track1 data
if (message.lParam & BXL_MSG_TRACK2)
// read track2 data
if (message.lParam & BXL_MSG_TRACK3)
// read track3 data
}
}