9.127 LIST_PRINTERS
Note: Built-In Function Rules Usage Options
This BIF will return a list of printers currently configured on the machine.
Refer to Technical Notes if running on Windows Vista.
Arguments
|
Return Values
|
Technical Notes
The working list will return the full printer name. This includes the domain name for remote printers. That is //domain/PrinterName. For example, \\ourdomain\Epson Stylus COLOR 900.
If printing through a server function, this BIF should be run on the server to obtain the list of printers available to the server and the list then passed back to the client. The selected printer name may then be sent to the server function that will perform the printing.
If running on Windows Vista, there is a limit to the number of printers that can be defined using this Built-In Function. This includes both local and remote printers. The limit depends on the printers defined, but as a guide, you should limit the number of printers to 12.
Example
FUNCTION OPTIONS(*DIRECT)
DEF_LIST NAME(#PRNLIST) FIELDS(#PRN_NAME #PRN_LOC) TYPE(*WORKING)
USE BUILTIN(LIST_PRINTERS) WITH_ARGS(A) TO_GET(#PRNLIST #STD_CMPAR)