WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


Printer Controller

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

pGetPrtInfo and Printer Attributes

Keywords: 	 pGetPrtInfo


I could use more information on some of the pGetPrtInfo options. In particular requests 9, 10, 11 & 12. I just need to know more about them as the meanings are a bit vague. I use some the other functions in pGetPrtInfo in various programs and would like to see if I can extend their functionality.

Is a possible data-type EMF or is that a print processor?



Request 9,10 11
The spooler monitors the current print jobs and the target printer to determine an appropriate time to print a job. Once the spooler determines that a job should be printed, it calls the print processor.
The main function of a print processor is to interpret what type of data is being passed from the spooler to the graphics engine. Windows NT includes WINPRINT.DLL as its only one print processor, which can interpret journal and raw data types.

Journal files are collections of Device Driver Interface (DDI) calls, which are precise commands specific to a particular hardware device. For example, a journal file created for a 150 dot-per-inch (dpi) LaserJet printer would not print properly on a 300 dpi LaserJet printer. Journal files can also contain TrueType font outline information, thus the destination printer need not have a particular font installed to render the print job. Journal files are processed, passed back to the spooler for routing to the graphics engine (GDI32.DLL), and then passed to the printer driver and finally sent to the output device.

Raw files need no processing from the print processor; they are handed to the spooler for routing to the graphics engine. An example of a raw data type is an encapsulated PostScript (.EPS) file because it needs no print processor interpretation or conversion.

Windows NT Advanced Server adds another print processor to the system: SFMPSPRT.DLL. This print processor interprets PostScript information passed from a Macintosh client and translates it to specific DDI commands that the Windows NT printer drivers can interpret. SFMPSPRT.DLL supports the PSCRIPT1 data type, which allows Macintosh clients to print PostScript files to raster printers.

Though its main job is to interpret compatible data types, the print processor also provides access to the printing process. You can modify the printing process by substituting a custom program in place of the Windows NT default print processor. A print processor could be used to filter data, to create a special dialog with the printer device, or to interpret a new data type. For example, you might have a print processor that filters ASCII for use on a PostScript printer.

EMF is a Data Type
Enhanced Metafile (EMF) data consists of instructions to call GDI functions. The print processor must call the GDI functions to render printable images. The GDI functions make calls to the printer driver's printer graphics DLL, which renders the image and sends it to the spooler as RAW data (by calling EngWritePrinter).

NT-based operating system clients send EMF data to NT-based operating system print servers. EMF data is device independent and can be sent to a server more quickly than RAW data. A print job is also spooled as EMF data when the requesting application is local to the server, allowing a quick return to the application while the EMF data is subsequently rendered by a background spooler thread.

For more information about the EMF data type, see the Windows 2000 Professional Resource Kit or the Windows 2000 Server Resource Kit. For more information about enhanced metafiles, see the Platform SDK documentation.

FOr more info see:

Request 12:PRINTER Attributes
Specifies the printer attributes. This member can be any reasonable combination of the following values. 

Windows 95/98/Me: Indicates the printer is the default printer in the system. 

Job is sent directly to the printer (it is not spooled).  

If set and printer is set for print-while-spooling, any jobs that have completed spooling are scheduled to print before jobs that have not completed spooling. 

Windows 95/98/Me: Indicates whether bi-directional communications are enabled for the printer. 

If set, DevQueryPrint is called. DevQueryPrint may fail if the document and printer setups do not match. Setting this flag causes mismatched documents to be held in the queue.  

Windows XP: If set, printer is a fax printer. This can only be set by AddPrinter, but it can be retrieved by EnumPrinters and GetPrinter.  

If set, jobs are kept after they are printed. If unset, jobs are deleted. 

If set, the printer spools and starts printing after the last page is spooled. If not set and PRINTER_ATTRIBUTE_DIRECT is not set, the printer spools and prints while spooling.  

Printer is shared.  

Windows 95/98/Me: Indicates whether the printer is currently connected. If the printer is not currently connected, print jobs will continue to spool. 

Windows 2000/XP: Indicates whether the printer is published in the directory service. 

Printer is a network printer connection. 


Printer is a local printer. 

Indicates that only raw data type print jobs can be spooled. 

Getting Printer Attributes (more)


I am trying to get printer attributes on a network printer, installed via point and print. It is returning a code of -6132 for all the attributes.

Also, is there a way to retrieve attributes for a printer without having to set it as the default?


Hmmm -6132 means an error occured, with error number 6132 (I think)

But I can find no information on such an error number (NMy list goes up to 6008) so it is some kind of a new one.

It would be some kind of Windows API error, not a WinBatch error.

Sorry can only get Attribs on default printers.

Article ID:   W15073
File Created: 2017:07:28:13:58:37
Last Updated: 2002:11:06:13:24:52