문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top