Specifications

Appendix B
Implementation in Monitor Thread
B-6
P1028248-001 Rev. A KR203 Software Integrator Guide 8/6/2010
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_IO_ACTIVE"));
if (dwResult & PRINTER_STATUS_BUSY)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_BUSY"));
if (dwResult & PRINTER_STATUS_PRINTING)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PRINTING"));
if (dwResult & PRINTER_STATUS_OUTPUT_BIN_FULL)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_OUTPUT_BIN_FULL"));
if (dwResult & PRINTER_STATUS_PROCESSING)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PROCESSING"));
if (dwResult & PRINTER_STATUS_USER_INTERVENTION)
{
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_USER_INTERVENTION"));
}
if (dwResult & PRINTER_STATUS_DOOR_OPEN)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_DOOR_OPEN"));
if (dwResult & PRINTER_STATUS_NOT_AVAILABLE)
{
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_NOT_AVAILABLE"));
if ((dwRet = GetPrinterData(pInfo->hPrinter,
L"ExternalError", &dType, (LPBYTE)&dwResult,
sizeof(dwResult), &dNeeded))!=ERROR_SUCCESS)
{
swprintf_s( str, 50, L"### [Status Thread
error %d read [%08X]\n", dwRet, dwResult);
} else
swprintf_s( str, 50, L"### [External Error]
read [%08X]\n", dwResult);
OutputDebugString(str);
swprintf_s( str, 50, L"### [External Error]
read [%08X]", dwResult);
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(str));
}
}
else