驱动安装包构成

参考ddk手册-Providing a Driver Package

  • 驱动文件,.dll, .sys之类
  • 指导安装的文件
    • .inf(information)
    • .cat(catalog)
    • co-installers
  • 其他文件

打印驱动内部运作原理

2020.10.23

GDI

windows vista and earlier version

GDI驱动运作原理图如下,

gdi_printer-formatted

GDI Printer Drivers

All Windows 2000 and later printer drivers consist of the following components:

  • A printer graphics DLL that assists GDI in rendering a print job, and sends the rendered data stream to the print spooler.

    usrmdprt

    gdiprint

  • A printer interface DLL that provides both a user interface to the driver's configuration parameters, and an interface the spooler can call to notify the driver of print-related system events.

2020.11.19

Notepad打印

notepad_print-formatted

XPS

windows 7 and later version

2020.10.26

TEMP

关键文件路径

:我的windows10系统里的路径(因为是挂载到Linux访问的,所以采用的是Linux的路径风格)。

C/Windows/System32/

  • winspool.drv
  • spoolss.dll
  • spoolsv.exe
  • gdi32.dll

Print Spooler

A print job is defined (or bracketed) by the StartDoc and EndDoc functions.

数据类型

  • EMF
  • ASCII
  • Raw

StartDoc EndDoc大概是很重要的API是EMF专用的?

Print Spooler API

:临时图片,不保存进git仓库,最后将总结到总的原理图中,

print-apis-ps

分为3类API

Print Spooler API Reference

Asynchronous Printing Notification Reference

Printer Driver Installation Reference

GDI

About the GDI Print API

GDI => printer driver(DLL which support DDI (D))