Path: utzoo!attcan!uunet!munnari.oz.au!uniwa!wacsvax!peter From: peter@wacsvax.OZ (Peter Dodd) Newsgroups: aus.mac,comp.sys.mac.programmer Subject: Restricting printer access Keywords: printing, INIT, trap, PrGlue Message-ID: <1594@wacsvax.OZ> Date: 28 May 90 11:48:20 GMT Organization: Comp Sci, Uni. Western Australia. Lines: 20 Hello - this may save someone some development time. We have recently developed an INIT to restrict access to network printers. The INIT installs a ToolBox trap in the system heap at startup time. The installed code is a patch to the PrGlue trap - at print time, it determines whether the user has correct privileges to use the selected printer. The problem we encountered lies in the use of the Print Manager by some applications. We can live with the fact that the older applications don't use the PrGlue routine described in Inside Macintosh Vol V, hence don't even "see" our patch. Of the applications which DO use the PrGlue routine, some implement their own dialog to replace the standard PRJobDialog routine (which is reasonable), but some applications do not check the retured value of routines such as PrOpenDoc, or test the value of PrError. This seems to make it impossible to write a general Print Manager trap which can perform the desired checking in a regular way with all applications. Peter Dodd Andrew D. Nielsen peter@wacsvax.cs.uwa.oz.au Nielsen_AD@cc.curtin.edu.au