https://blogs.technet.microsoft.com/askperf/2007/06/19/basic-printing-architecture/

Printer sharing, information retrieval, and data storage are among the most frequently used network services.  This also means that when something major happens to a print server or file server – lots of people are adversely affected.  Issues with Print Servers and the Print Spooler are very common issues for the Performance team.  So today, we’re going to kick off our series of posts on Printing with an overview of the Windows Printing Architecture and the Print Spooler.

Broken down into basic elements, the Windows printing architecture consists of a print spooler and a set of print drivers.  The print spooler is the primary component of the printing interface.  Most administrators are familiar with the spooler as an executable file (spoolsv.exe) that manages the printing process.  In a default configuration, the spooler is loaded at system startup and continues to run until the operating system is shut down.  The print spooler consists of a set of Microsoft and vendor components that perform the following tasks:

  • Should a print job be handled locally or across a network?
  • Accepting a data stream created by GDI, in conjunction with a printer driver, for output on a particular printer type
  • Spooling the data to a file
  • Selecting the first available physical printer in a logical printer queue
  • Converting a data stream from a spooled format such as EMF to a format that can be sent to the printer hardware (such as PCL)
  • Sending a data stream to printer hardware
  • Maintaining the registry database for spooler components and printer forms

Below is a simplified view of the print spooler components.  When looking at this diagram, if the printer hardware is local to the system, then the “client” and “server” pieces are all on the same machine.

Application – The print application creates a print job by calling Graphics Device Interface (GDI) functions

GDI – GDI includes user-mode and kernel-mode components.  The user-mode component, Microsoft Win32 GDI, is used by Win32 applications that require graphics support.  The kernel-mode component, the graphics engine, exports services and functions that graphics device drivers can use

Winspool.drv – This is the client interface into the spooler.

Spoolsv.exe –  This is the spooler’s API server.  It is implemented as a service when the OS is started

Spoolss.dll – Spoolss.dll acts as a router, determining which print provider to call based on a printer name or handle supplied with each function call.  It then passes the function call to the correct provider.

OK – so let’s discuss print providers.  The print provider is responsible for several functions, including directing print jobs to local or remote print devices and print queue management operations such as starting, stopping and enumerating print queues.  Print providers implement a common set of capabilities that are defined by a set of API functions.  These functions are called by spoolss.dll.  The diagram below illustrates possible flow paths involving different print providers.

The following print providers are supplied by Microsoft in Windows 2000, XP & Windows Server 2003:

localspl.dll – this is the local print provider which handles all print jobs directed to local printers

win32spl.dll – this is the Windows network print provider.  All print jobs directed to remote servers and handled by this provider.  When the job arrives at the remote server it is passed to the server’s local print provider

nwprovau.dll – Novell NetWare print provider

inetpp.dll – HTTP print provider which handles print jobs sent to a URL

Printer manufacturers may also create their own network print providers.

And that brings us to Print Processors.  Print processors are user-mode DLL files that convert the spooled data from a print job into a format that is understood by a print monitor.  When a print job is spooled, the data is contained in a spool file.  The print processor reads the file, performs the conversion on the data stream and writes the converted data to the spooler.  The spooler sends the data to the correct print monitor.  Print processors are associated with printer drivers during driver installation.  The default Print Processor provided with the operating system is winprint.dll.

Lastly, let’s talk about Print Monitors.  These are user-mode DLL’s responsible for directing a print data stream from the spooler to an appropriate port driver.  When we talk about print monitors we are actually referring to two different types of monitor.  First, there is the language monitor which provides a full-duplex communications path between the print spooler and bi-directional printers that are capable of providing software-accessible status information.  In addition, the language monitors add printer control information to the data stream.  It is important to note that Language monitors can be used to add any post spooling processing.  In addition to the Language monitors, we also have Port monitors.  These are responsible for providing a communications path between the user-mode print spooler and the kernel-mode port drivers that access I/O port hardware.  Port monitors are, as the name suggests, responsible for management and configuration of the printer ports on a server.

And that will do it for our look at the Basic Printing Architecture.  In future posts, we will be looking at drivers, troubleshooting and policies.  Until next time …

Additional Resources:

– CC Hameed

Basic Printing Architecture的更多相关文章

  1. Printing Architecture

    Printing Architecture http://www.codeproject.com/Articles/8916/Printing-Architecture     This articl ...

  2. Basic Router Architecture

    from the book principles and practices of interconnection networks  the chapter router architecture ...

  3. Struts 2 Tutorial Basic MVC Architecture

    Model View Controller or MVC as it is popularly called, is a software design pattern for developing ...

  4. Chromium Graphics: Compositor Thread Architecture

    Compositor Thread Architecture <jamesr, enne, vangelis, nduca> @chromium.org Goals The main re ...

  5. Nginx Tutorial #1: Basic Concepts(转)

    add by zhj: 文章写的很好,适合初学者 原文:https://www.netguru.com/codestories/nginx-tutorial-basics-concepts Intro ...

  6. Framework for Graphics Animation and Compositing Operations

    FIELD OF THE DISCLOSURE The subject matter of the present disclosure relates to a framework for hand ...

  7. Command and Query Responsibility Segregation (CQRS) Pattern 命令和查询职责分离(CQRS)模式

    Segregate operations that read data from operations that update data by using separate interfaces. T ...

  8. RNN 入门教程 Part 4 – 实现 RNN-LSTM 和 GRU 模型

    转载 - Recurrent Neural Network Tutorial, Part 4 – Implementing a GRU/LSTM RNN with Python and Theano ...

  9. bluetooth service uuid

    转自:https://www.bluetooth.com/specifications/assigned-numbers/service-discovery service discovery ​​​ ...

随机推荐

  1. linux补包

    1.挂载文件export LANG=Cmkdir -p /media/cdrommount /dev/cdrom /media/cdrommount /dev/hdc /media/cdrommoun ...

  2. js的深拷贝和浅拷贝

    一.数组的深浅拷贝 在使用JavaScript对数组进行操作的时候,我们经常需要将数组进行备份,事实证明如果只是简单的将它赋予其他变量,那么我们只要更改其中的任何一个,然后其他的也会跟着改变,这就导致 ...

  3. Python使用mechanize模拟浏览器

    Python使用mechanize模拟浏览器 之前我使用自带的urllib2模拟浏览器去进行訪问网页等操作,非常多站点都会出错误,还会返回乱码.之后使用了 mechanize模拟浏览器,这些情况都没出 ...

  4. Android ProgressBar SeekBar

    1.ProgressBar 进度条 当水平进度条完成后,隐藏该进度条,并显示一张图片 常用属性: 1. android:max 设置进度条的最大值 2. android:progress 用于指定进度 ...

  5. 完毕port(CompletionPort)具体解释 - 手把手教你玩转网络编程系列之三

       手把手叫你玩转网络编程系列之三    完毕port(Completion Port)具体解释                                                    ...

  6. TinyXml 快速入门(三)

    在<TinyXml 快速入门(二)>介绍使用tinyxml库获取xml文件声明,查询指定节点.删除指定节点的做法.在本文中继续介绍修改指定节点和增加节点的做法. 修改节点其实和查询指定节点 ...

  7. [转] Python 模块学习:os模块

    一.os模块概述 Python os模块包含普遍的操作系统功能.如果你希望你的程序能够与平台无关的话,这个模块是尤为重要的.(一语中的) 二.常用方法 1.os.name 输出字符串指示正在使用的平台 ...

  8. [转] 用GDB调试程序(五)

    转:http://blog.csdn.net/haoel/article/details/2883 查看运行时数据———————        在你调试程序时,当程序被停住时,你可以使用print命令 ...

  9. IIS部署FTP服务器步骤

    本文介绍如何在IIS中部署FTP服务端.首先确认windows开启了ftp功能:确认方法:进入控制面板->程序->打开或关闭windows功能如下图所示: 确认FTP勾选 确认后打开IIS ...

  10. 手机端input,select屏蔽浏览器默认事件

    文本框input:当文本框focus时会弹出软键盘,有时我们需要click事件而又不想触发focus事件(不要弹出软键盘) 给input添加 disabled="disabled" ...