如何为虚拟打印机编写驱动程序 [英] How to write a driver for virtual printer
问题描述
我想为虚拟打印机编写驱动程序(用 C++ 或 Java)(如如何在 Windows 中创建虚拟打印机?)我会将文件重定向到文件服务器(再次如 http://www.colorpilot.com/VirtualPrinterForCSharp2.html.
I want to write a driver for virtual printer (in C++ or Java) (As explained in How to create a virtual printer in Windows?) I would redirect the file to a file server (again as explained in http://www.colorpilot.com/VirtualPrinterForCSharp2.html.
打印机驱动程序的基本构建块是什么?
我已经阅读了有关后台处理程序和打印监视器的内容,但我不确定这些是我所需要知道的全部内容!
I have read about spooler and print monitor but I am not sure that these are all that I have to know!
任何指南或建议提前表示赞赏!
Any guide or suggestion appreciated in advance!
问候
推荐答案
使用端口监视器可以满足大多数打印重定向要求.你不需要做打印机驱动程序,因为如果你这样做,那么在可能想要使用他们的打印机驱动程序的最终用户之间进行广泛的推广会更加困难,你将需要为每台打印机提供驱动程序等等.
Most print redirection requirements are fulfilled using a Port Monitor. You dont need to do a printer driver because if you do that then this is more difficult to broadbase across end-users who may want to use their printer drivers, you will need to have drivers for each printer and so on.
http://pages.cs.wisc.edu/~ghost/redmon/ 是一个很好的重定向端口监视器示例.主要用 C 语言编写.在了解如何在项目中使用它之前,请先查看许可协议.
http://pages.cs.wisc.edu/~ghost/redmon/ is a very good example of a redirection port monitor. Mostly written in C. Please look at the licensing agreements before you see how you can use it in your project.
Windows WDK(Windows 驱动程序工具包)中还有一个示例端口监视器,您可以使用基本参考.
There is also a sample port monitor in the Windows WDK (Windows Driver Kit) you could use a base reference.
希望这会有所帮助.如果是这样,请投票 +1 :)
Hope this helps. If so, please vote a +1 :)
这篇关于如何为虚拟打印机编写驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!