[comp.sys.amiga.tech] Printer.device/Preferences interaction

gay@elde.epfl.ch (David Gay) (03/18/89)

Two questions on the printer.device/preferences interactions:

a) Is it possible to override the preferences printer settings other than
by actually doing a SetPrefs ?

b) If not, when are the preferences read by the printer.device ? What happens
if you change them while the device is open ?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David Gay                                  6 x 9 = 42

GAY@ELDE.EPFL.CH, or GAY%ELDE.EPFL.CH@CLSEPF51.bitnet

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

daveb@cbmvax.UUCP (Dave Berezowski) (03/21/89)

In article <890318145248.204009ac@elcc.epfl.ch> gay@elde.epfl.ch (David Gay) writes:
>Two questions on the printer.device/preferences interactions:
>
>a) Is it possible to override the preferences printer settings other than
>by actually doing a SetPrefs ?
>
	Yes, use the following code segment to look/alter the printer's
copy of preferences.

	struct IODRPReq PReq;
	struct PrinterData *PD;

	if (OpenDevice("printer.device", 0, &PReq, 0) == NULL) {
		PD = (struct PrinterData *)PReq.io_Device;
		/* now look at PD->pd_Preferences */
		CloseDevice(&PReq);
	}

>b) If not, when are the preferences read by the printer.device ? What happens
>if you change them while the device is open ?
>
	Preferences are read by the printer.device whenever the device is
opended.  If you change preferences (not the printer's copy of preferences)
while the device is opened NOTHING will happen as the printer is using its
own copy.  Alter the printer's copy if you want to change something.

	David