4. Message
프린터에서 이벤트가 발생하였을 경우 WM_MSR_ARRIVED 메시지를
발생 합니다. 이 메시지가 발생한다면 lParam, wParam 값으로 세부 이벤트 내용과
변동 내용을 확인 할 수 있습니다.
4-1 BXL_LPARAM _MSR
lParam 에 설정된 MSR Track 정보를 Bit 단위로 설정되어 리턴합니다.
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
}
}