GetServerPrinter method
This method is intended for use with C/C++.
- Method
- short GetServerPrinter(
- 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 string 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 GetServerPrinterInfo methods
The following example retrieves the names and attributes
of the available server printers.
CArsOle * pArsCtrl;
short rc, j, num_prts;
char name[ 200 ];
VARIANT vari, type;
.
.
.
rc = pArsCtrl->GetNumServerPrinters( &vari );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
num_prts = vari.iVal;
for ( j = 0; j < num_prts; j++ )
{
rc = pArsCtrl->GetServerPrinter( j, name, type );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
// Process name and type
}
.
.
.