Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!dartvax!earleh From: earleh@dartvax.UUCP (Earle R. Horton) Newsgroups: comp.sys.mac Subject: Re: Making sure PrGeneral exists Message-ID: <7532@dartvax.UUCP> Date: Sat, 31-Oct-87 17:08:58 EST Article-I.D.: dartvax.7532 Posted: Sat Oct 31 17:08:58 1987 Date-Received: Thu, 5-Nov-87 06:45:20 EST References: <12346681477.300.P.PRIAPUS@HAMLET.STANFORD.EDU> Organization: disorganized Lines: 26 In article <12346681477.300.P.PRIAPUS@HAMLET.STANFORD.EDU>, P.PRIAPUS@HAMLET.STANFORD.EDU (Bill Lipa) writes: > PrGeneral is a new feature of the ImageWriter (versions 2.5 and later) and the > LaserWriter (version 4.0) drivers which provides extensibility through a simple > procedure call. I need to determine inside my application whether the print > software the user has selected with the chooser has this feature implemented. > Is there a reliable way to get the version number of the driver in use? If not, > is the PrGeneral trap equal to the unimplemented trap in earlier software? PrGeneral() is in a 'PDEF' resource containing 68000 code to implement the function. I think its ID is 7. You can check for the existence of this resource yourself at run time. If you are using a high level language which implements a PrGeneral() call, then you should be able to just call it and let the development system library routine find out if it exists. Either PrError() or ResError() will return resNotFound if the resource does not exist. It's important to realize that the Printing Manager calls are not traps, but are calls to code which is stored in the ImageWriter or LaserWriter file. Your development system usually provides a library of functions to find and call the routines for you, and should also tell you if this is not possible (Printer Resource file not present, for example, or in this case no PrGeneral code to be found.) -- ********************************************************************* *Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755 * *********************************************************************