2-3 State (LONG R)
This attribute sets the printer State. It can only be read, and is automatically set when
examining the printer State by using the CheckPrinter function. As State values can be set
in duplication, each value can be confirmed via bit calculation. The values of this attribute
can be recalled by using the GetState function.
Printer State values are as follows.
Printer status is normal.
The printer paper cover is open.
Currently in MSR read mode, printing not possible
long lResult;
lResult = PrinterOpen(“portinfo…”, 1000);
……
CheckPrinter();
…...
int iState;
iState = GetState();
if ((iState & BXL_STS_PAPEREMPTY) == BXL_STS_PAPEREMPTY)
……
if ((iState & BXL_STS_COVEROPEN) == BXL_STS_COVEROPEN)
……
…….