Spooler API 中 Windows RegisterForPrintAsyncNotifications 的示例代码?

发布于 2024-09-05 03:11:35 字数 310 浏览 2 评论 0原文

Windows Vista 通过 RegisterForPrintAsyncNotifications 函数引入了来自打印机后台处理程序的通知 ( http://msdn.microsoft.com/en-us/library/dd162919(VS.85).aspx)

有谁知道使用该函数的后台处理程序通知的示例代码吗?我一直找不到任何东西,微软在没有示例的情况下发布该方法似乎很奇怪。

Windows Vista introduced notifications from the Printer Spooler with the RegisterForPrintAsyncNotifications function (http://msdn.microsoft.com/en-us/library/dd162919(VS.85).aspx)

Does anyone know of any sample code for spooler notifications using that function? I have been unable to find any and it seems strange that Microsoft would publish the method without examples.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单调的奢华 2024-09-12 03:11:35

Windows WDK 8.1 包含一个示例 VS 解决方案,该解决方案演示了异步API。但它不是 Win10 WDK 的一部分。该解决方案构建了两个项目:

  • 一个静态库,您可以将其与端口监视器或打印机驱动程序链接,并广播通知;
  • 客户端应用程序接收通知并从系统托盘弹出消息框或气球 UI。

您可能还应该查看这篇 MS 日语文章其中列出了从现有代码调用静态库 api 所需的步骤。

The Windows WDK 8.1 contains a sample VS solution that demonstrates the async API. But it's not part of the Win10 WDK. The solution builds two projects:

  • a static library that you can link with your port monitor or printer driver and which broadcasts notifications
  • a client app that receives the notifications and pops message boxes or balloon UI from the system tray.

You should probably also check this MS Japanese article which lists the steps required to call the static library api from your existing code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文