Gets the printers available to the machine.
Syntax
Result = SRP_Get_Printers(Option)
Returns
An @FM delimited list of printer names.
Parameters
Parameter | Description |
---|---|
Option | Determines which printers are to be returned. |
Remarks
The SRP_Get_Printers method is an OIPI-free way to get the list of printers. The option parameter accepts the following values: "DEFAULT", "LOCAL", "SHARE", "CONNECTIONS", "NETWORK", and "REMOTE". Here are the effects of each option:
Parameter | Description |
---|---|
"DEFAULT" | Returns the default printer. |
"LOCAL" | Returns the list of printers currently added to the computer. |
"SHARE" | Returns the list of printers with the shared attribute set. |
"CONNECTIONS" | Returns the list of printers to which the user has made previous connections. |
"NETWORK" | Returns the list of network printers on the computer's domain. |
"REMOTE" | Returns the list of network printers and print servers in the computer's domain. |
If you omit the Option parameter, then "LOCAL" is assumed. Once you have your list of printers, you can optionally pass any one of the printer names to the SRP_Get_PrinterInfo to get more information about the printer's capabilities.
Example
// Get the printers added to the machine LocalPrinters = SRP_Get_Printers("Local") // Get the printers available on the network NetworkPrinters = SRP_Get_Printers("Network")