驱动安装包构成
参考ddk手册-Providing a Driver Package
- 驱动文件,
.dll
,.sys
之类 - 指导安装的文件
.inf
(information).cat
(catalog)- co-installers
- 其他文件
打印驱动内部运作原理
GDI
windows vista and earlier version
GDI驱动运作原理图如下,
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.
-
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.
Notepad打印
XPS
windows 7 and later version
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仓库,最后将总结到总的原理图中,
分为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))