// JP opened flex table

Click to See Complete Forum and Search --> : service and FindFirstPrinterChangeNotification


drick
February 16th, 2007, 09:47 AM
hi,

i want to make a service who log the printer job.

I have made a console application that use FindFirstPrinterChangeNotification, WaitForSingleObject and FindNextPrinterChangeNotification ...
=> it does work.

i have made a simple service that beep(500,1000) => it does work.

but when i put my "printer job logger" code to my service, it doesn't work

have you a reason ? some right problem ?
this is a sample code of the service function:

hNotifier=FindFirstPrinterChangeNotification(HPrint,PRINTER_CHANGE_JOB,0,&Pob);

while(bRunning)
{
if (!hNotifier) return;
WaitForSingleObject(hNotifier, INFINITE);

FindNextPrinterChangeNotification(hNotifier,&ChangeReason,&Pob,(void**)&Pni);

//JP added flex table