santamaria
asked on
C++ Language question
Could someone give me an example using the following API:
OpenPrinter();
FindFirstPrinterChangeNoti fication() ;
WaitForSingleObjectEx()
FindNextPrinterChangeNotif ication();
I'm using MS Visual C++ on Windows NT 4.0
I am trying to log the print jobs that are sent to the printer on an NT 4.0 PrintServer, together with the username and number of pages. I'm able to get a printer handle, then a handle to the notification object. I then use the WaitForObjectEx() function to wait for the change notification (PRINTER_CHANGE_ADD_JOB. The wait functions then returns successfully. When I use the FindNextPrinterChangeNotif ication() It returns a value of 1 yet the information structure contains no information.I'm declaring a PRINTER_NOTIFY_INFO and I then use a pointer to this structure to pass it to the FindNextPrinterChangeNotif ication().
Thanks.
OpenPrinter();
FindFirstPrinterChangeNoti
WaitForSingleObjectEx()
FindNextPrinterChangeNotif
I'm using MS Visual C++ on Windows NT 4.0
I am trying to log the print jobs that are sent to the printer on an NT 4.0 PrintServer, together with the username and number of pages. I'm able to get a printer handle, then a handle to the notification object. I then use the WaitForObjectEx() function to wait for the change notification (PRINTER_CHANGE_ADD_JOB. The wait functions then returns successfully. When I use the FindNextPrinterChangeNotif
Thanks.
I'm writing an example right now. Will post when done.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER