GetServerPrinterInfo method
This method is intended for use with Visual Basic.
- Method
- short GetServerPrinterInfo(
- Parameters
- Index
- Specifies the zero-based index of the printer to be returned. It must be a number greater than or equal to zero and less than the value returned by GetNumServerPrinters.
- pName
- Points to a BSTR to receive the name of the server printer.
- pType
- Points to a variable to receive the type of the server printer.
It will be one of the following type values found in ARSOLEEX.H:
- ARS_OLE_SERVER_PRINTER_PRINT
- ARS_OLE_SERVER_PRINTER_PRINT_WITH_INFO
- ARS_OLE_SERVER_PRINTER_FAX
- Description
- The server printer information is retrieved.
- Return Value
- Refer to return codes.
- See Also
- GetNumServerPrinters and GetServerPrinter methods
The following example retrieves the names and attributes
of the available server printers.
Dim rc, count As Integer
Dim num_prts, type As Variant
Dim name As String
.
.
rc = ArsOle.GetNumServerPrinters (num_prts)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
For count = 0 To num_prts -1
rc = ArsOle.GetServerPrinterInfo (count, name, type)
' Process name and type
Next count
.
.