创建 Windows 打印驱动程序
我正在创建一个打印驱动程序,该驱动程序将监视发送到特定打印机的作业并向每个页面添加少量文本。我已经下载了 WDK 并且位图示例可以运行,但是监视器示例很复杂。 WDK 文档似乎缺乏对示例的任何解释。我也没有看到任何适用于 Windows 驱动程序的 Visual Studio 模板(不确定它们是否应该作为 WDK 的一部分安装)。
我认为我最困难的是了解整体方法。由于这是打印到打印机(而不是文件),我假设我仍然需要以某种方式使用打印机的驱动程序。那么这是否使我想做的事情成为“过滤器驱动程序”?正如您所知,这不是我以前做过的事情,因此我们将不胜感激任何帮助或指导。
谢谢, 瑞安
I'm looking to create a print driver that will monitor jobs sent to a particular printer and add in a small amount of text to each page. I have downloaded the WDK and have the bitmap example working, but the monitor examples are complicated. The WDK documentation seems to be lacking any explanation of the samples. I also don't see any Visual Studio templates for Windows Drivers (not sure if they are supposed to be installed as part of the WDK or not).
I think what I'm struggling the most with is seeing the overall approach. Since this is printing to a printer (not file), I'm assuming I still need to use the printer's driver somehow. So does that make what I'm trying to do a "Filter Driver"? As you can tell, this is not something I've done before, so any help or direction would be greatly appreciated.
Thanks,
Ryan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您具体需要添加什么?您可以使用WinDDK中的迷你驱动程序并劫持其中一个命令。
如果您需要添加更多内容,您可能需要一个端口监视器,例如 Redmon(或者我们即将发布一个)它可以将您的作业发送到某个应用程序,修改数据,然后发送到最终的打印机。
如果您只需要在开始时插入一些项目(注入一些 PCL 或其他内容),那么您可以使用 Windows分隔符页 并在流的开头插入数据。
如果您提供有关您到底需要修改或插入哪些内容的更多详细信息,我可能可以提供更多帮助。
What exactly do you need to add in? You can use the Mini Driver in the WinDDK and just hijack one of the commands.
If you need to add in something more you'll probably want a port monitor like Redmon (or we are about to release one) that can take your job and route it to some application that modifies the data and then routes to the final printer.
If you just need to insert some items at the very start (inject some PCL or something) then you can use the Windows separator page and insert the data at the start of the stream.
If you give some more detail about what exactly you need to modify or insert I can probably help a little more.