APUGetPrinterStatus() Function
- Last UpdatedMar 03, 2021
- 1 minute read
Returns the most recent status of the Windows printer used by this instance.
Category
View
Syntax
[Result=] APUGetPrinterStatus(iInstance, iSelector, iTagStatus);
Arguments
iInstance
The instance of Alarm Printer (0 to 15).
iSelector
An integer value specifying the following:
0 = Get status for Alarm Printer Error
1 = Get status for Alarm Printer No Paper
2 = Get status for Alarm Printer Offline
3 = Get status for Alarm Printer Overflow
iTagStatus
An integer or real tag that receives the status of the printer associated with specified instance number and the type of selection made by the iSelector parameter.
Remarks
This function returns the printer status to an integer or real tag as the iTagStatus parameter. The results are not current unless a query is running and an alarm has been printed. The status typically updates when the printer initially opens, and then each time an alarm line prints.
This status information is being queried to the printer based on Microsoft or Windows driver standards. Not all printer manufacturers follow these standards. Therefore, not all printers return status information.
Returns an integer error code.
Example
PrtStat is an integer tag that receives the "Printer Offline" status from the printer associated with instance 5.
Status = APUGetPrinterStatus(5, 2, PrtStat);
See Also
APUGetPrinterName()