So far I have been unable to raise a valid event handle from FindFirstPrinterChangeNotification although I have tried it both with and without a pointer to a PRINTER_NOTIFY_OPTIONS structure. The function is being passed a valid printer handle.
(ByVal hPrinter As Long, ByVal fdwFlags As Long, ByVal fdwOptions As Long, ByVal lpPrinterNotifyOptions As Long) As Long
Public Sub WaitForPrinterEvent(ByVal hPrinter As Long)
'Call InitialiseNotifyOptions '\\ initialize structures
'mEventHandle = apiFindFirstPrinterChangeNotificationLong(hPrinter, PRINTER_CHANGE_JOB, 0, varPtr(PrintOptions)) '\\ ptr to PRINTER_NOTIFY_OPTIONS structure
mEventHandle = apiFindFirstPrinterChangeNotificationLong(hPrinter, PRINTER_CHANGE_JOB, 0, 0)
If mEventHandle <> INVALID_HANDLE_VALUE Then
'do stuff here...
Is this an insurmountable network issue? Should I consider an alternative approach? Any suggestions on how to register a printer event will be welcome.