formerTexan
Programmer
I would like to verify that a report (MS Access in this case) has actually printed. This is in a setting with Windows XP on a Novell network.
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.
Is this an insurmountable network issue? Should I consider an alternative approach? Any suggestions on how to register a printer event will be welcome.
Thanks,
Bill
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.
Code:
Public Declare Function apiFindFirstPrinterChangeNotificationLong Lib "winspool.drv" Alias "FindFirstPrinterChangeNotification" _
(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...
End If
End Sub
Is this an insurmountable network issue? Should I consider an alternative approach? Any suggestions on how to register a printer event will be welcome.
Thanks,
Bill