When you are watching a printer with FindNextPrinterChangeNotification it is possible for one notification return to be about multiple events....

VB Code:
  1. '\\ Declaration
  2. Declare Function FindNextPrinterChangeNotificationByLong Lib "winspool.drv" Alias "FindNextPrinterChangeNotification" _
  3.     (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:
  1. '\\ Declarations
  2. Public Type PRINTER_NOTIFY_INFO_DATA
  3.   Type As Integer
  4.   Field As Integer
  5.   Reserved As Long
  6.   id As Long
  7.   adwData(0 To 1) As Long
  8. 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