Andrew
2009-04-14 15:54:52 UTC
Hello,
Getting notified of printing events with
FindNextPrinterChangeNotification doesn't seem to me reliable to catch
all notifications.
As soon as the wait function returns from waiting on the handle
(returned by FindFirstPrinterChangeNotification
\FindNextPrinterChangeNotification) it is subject to miss the
notifications until the next wait.
The only solution is to quickly post the data returned by
FindNextPrinterChangeNotification and return to waiting.
But this scenario won't catch ALL of the notifications.
I need to be sure I am catching all the notifications because I need
to know when a printing to file job has finished.
I had the idea to monitor the printing queue but it doesn't seem
reliable because of the reasons pointed above.
Is there a way to make monitoring to catch all 100% or is there any
other way to know the printing to file has finished ?
I am printing to XPS using Microsoft XPS Document Writer.
Getting notified of printing events with
FindNextPrinterChangeNotification doesn't seem to me reliable to catch
all notifications.
As soon as the wait function returns from waiting on the handle
(returned by FindFirstPrinterChangeNotification
\FindNextPrinterChangeNotification) it is subject to miss the
notifications until the next wait.
The only solution is to quickly post the data returned by
FindNextPrinterChangeNotification and return to waiting.
But this scenario won't catch ALL of the notifications.
I need to be sure I am catching all the notifications because I need
to know when a printing to file job has finished.
I had the idea to monitor the printing queue but it doesn't seem
reliable because of the reasons pointed above.
Is there a way to make monitoring to catch all 100% or is there any
other way to know the printing to file has finished ?
I am printing to XPS using Microsoft XPS Document Writer.