how to log and control the printer job

Hi all,

I have two requirements in my project, it is related to printer.
I don’t have much idea regarding monitor and control print jobs
to local or remote print devices.
So I hope I can get some guidance from this group regarding my
problem.

task about monitor:
I want to log the print jobs include user, file name, file path and
time.
task about control:
when I got the file name, I can judge whether pass the job to print
devices.

I have read the DDK help, I think print provider, print processor and
print monitor is useful. But I don’t have idea where can I begin.
And I have checked the Kernel Driver FAQ, someone said can do this by
hook the printer driver, but I don’t know how to begin.

Anybody have any suggestions? I’m stumped.

Thanks,
Alan

ashwinnHi all,

I have two requirements in my project, it is related to the printer.
I don’t know how to monitor and control print jobs on local or remote
print devices.
So I hope I can get some advise from this group to solve my problems.

task about monitor:
I want to log the print jobs include user, file name, file path and
time.
task about control:
when I got the file name, I can make a decission whether to pass the
job to the print devices.

I have read the DDK help, I think samples of print provider, print
processor and print monitor are useful. But I don’t know which one I
should follow. And I have checked the Kernel Driver FAQ, someone said
this could be done by hooking the printer driver, but I don’t know how
to begin.

Anybody have any suggestions? I’m stumped.

Thanks,
Alan

A custom print processor is probably the route to go. But there are some
limitations. For instance, you may not be able to get a hold of the file
name, path etc. since that information is controlled by the app that is
generating the print job. If the app decides not to pass that
information down in its calls to GDI, the rest of the print subsystem
does not have it. But the typical approach for job monitoring/accounting
is to write a custom print processor. So that will probably work best in
your case as well.

  • Ashwin

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alan
Sent: Sunday, November 21, 2004 7:02 PM
To: Windows System Software Devs Interest List
Cc: Ashwin Needamangala
Subject: [ntdev] how to log and control the printer job

ashwinnHi all,

I have two requirements in my project, it is related to the printer.
I don’t know how to monitor and control print jobs on local or remote
print devices.
So I hope I can get some advise from this group to solve my problems.

task about monitor:
I want to log the print jobs include user, file name, file path and
time.
task about control:
when I got the file name, I can make a decission whether to pass the job
to the print devices.

I have read the DDK help, I think samples of print provider, print
processor and print monitor are useful. But I don’t know which one I
should follow. And I have checked the Kernel Driver FAQ, someone said
this could be done by hooking the printer driver, but I don’t know how
to begin.

Anybody have any suggestions? I’m stumped.

Thanks,
Alan


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com