Detailed Descriptions > MIAMEX

MIAMEX 120: Prompt for Windows printer

xcall MIAMEX, MX_WINPTR, status, printer {,port {,driver}}

(Windows/ATE) This function displays a standard Windows printer selection dialog and returns information about the printer selected. This might be useful for building printer initialization files (see Defining Spoolers in the A-Shell Setup Guide) based on the selected printer. Or, you can take it one step farther and just use the full Windows printer name (as returned in the printer parameter) directly when sending files to the printer. For more information, see EZSPL in this document and PRINT.LIT in the A-Shell Command Reference.

Note that this operation can only take place on a GUI-enabled client, either ATE or some form of A-Shell/Windows.

Parameters

status  (Num)  [out]

Value

Description

0

User cancelled out of the printer selection dialog

-1

Feature not supported (requires ATE or A-Shell/Windows)

-2

Invalid ATE response (ATE must be build 960+)

>0

OK

 

printer  (String)  [out]

will return the descriptive printer name of the printer selected by the user. (This is normally the name which appears under the icon in the printer selection window.)

port (String)  [out]  (optional)

will return the port name. This could be a traditional physical port (like LPT1:), or a logical network port (like NET01: or IP_192.158.200.250).

driver  (String)  [out]  (optional)

will return the name of the driver. In most cases with newer versions of Windows, this will be the universal spooler driver “winspool” (which in turn calls the hardware-specific driver).

History

Build 960 of July 2006

This function now supports ATE. Thus, the application on the server can now prompt the user to choose a windows printer, and then, using Tab(-10,54), send this information to the ATE client prior to printing to it via the DEVICE=AUXLOC: option. Note that to be effective, this requires that a printer init file exist for the specified printer name in the ASHCFG: directory of the ATE client (aka %MIAME%\dsk0\001007).