FindNextPrinterChangeNotification with multiple jobs - how to know what happened to w
When you are watching a printer with FindNextPrinterChangeNotification it is possible for one notification return to be about multiple events....
VB Code:
'\\ Declaration
Declare Function FindNextPrinterChangeNotificationByLong Lib "winspool.drv" Alias "FindNextPrinterChangeNotification" _
(ByVal hChange As Long, pdwChange As Long, pPrinterOptions As PRINTER_NOTIFY_OPTIONS, ppPrinterNotifyInfo As Long) As Long
In this case pdwChange is a combination of flags (like Job added + job deleted) and the data about each individual job is held in an array pointed to by ppPrinterNotifyInfo.
e.g.
VB Code:
'\\ Declarations
Public Type PRINTER_NOTIFY_INFO_DATA
Type As Integer
Field As Integer
Reserved As Long
id As Long
adwData(0 To 1) As Long
End Type
For each of these the id field specifies the unique job id, but there doesn't seem to be a way of linking the change that happened (pdwChange) to that particular job.
Any ideas - or am I misinterpretting how this is supposed to work?
Thanks in advance,
Duncan