Hi all,
I am working with a security system. For each secured files we are
maintaing access contorl list in a database. As a part of this system,I
want to intercept all print jobs before printing and to cancel printing if
user dosn’t have previlages to print particular file. Can anyone tell me
the way?
Thanx in advance.
T.Umapathy.
Sounds like you can use the GetJob, EnumJobs functions to obtain a
JOB_INFO_x structure and then do a SetJob if you need to cancel the
particular job. You could do this in a number of different ways. One
possible approach is to write a print monitor.
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: T.Umapathy [mailto:xxxxx@yahoo.com]
Sent: Monday, March 11, 2002 5:03 AM
To: NT Developers Interest List
Subject: [ntdev] How to intercept Print Jobs?
Hi all,
I am working with a security system. For each secured files we are
maintaing access contorl list in a database. As a part of this system,I
want to intercept all print jobs before printing and to cancel printing
if user dosn’t have previlages to print particular file. Can anyone tell
me the way?
Thanx in advance.
T.Umapathy.
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%
Hi Ashwin,
Thanx for your help. Can I create a service with a thread to keep on
checking the print jobs? Is there any other way? Please give me details.
Regards,
T.Umapathy
Hi there,
I am also interested in intercepting print jobs, with a view to seeing what
we can do. This may include denying a user the right to print files (same
as you) or possibly adding classification header/footers. Like you, I work
in the security business.
I was looking at developing a print preprocessor, cos that’s what ClickBook
(from www.bluesquirrel.com) does.
I would be interested to know what you’re doing, how you’re getting on, and
also any info that gets sent to you directly.
Thanks
Richie
On Tuesday, March 12, 2002 11:06 AM, T.Umapathy [SMTP:xxxxx@yahoo.com]
wrote:
Hi Ashwin,
Thanx for your help. Can I create a service with a thread to keep on
checking the print jobs? Is there any other way? Please give me details.
Regards,
T.Umapathy
You are currently subscribed to ntdev as: xxxxx@eris.QinetiQ.com
To unsubscribe send a blank email to %%email.unsub%%
T.Umapathy,
you wrote on Tuesday, March 12, 2002, 12:05:47:
TU> Thanx for your help. Can I create a service with a thread to keep on
TU> checking the print jobs? Is there any other way? Please give me details.
What about
FindFirstPrinterChangeNotification()/FindNextPrinterChangeNotification()?
Only works on NT, though.
Ralf.
I am not an expert on services and stuff like that. So while you might
be able to use FindFirstPrinterChangeNotification in a service like
someone else on the newsgroup suggested, I am not sure on the details.
Certainly worth a shot though since this is a lot easier than writing a
print processor or a print monitor.
If not, you can either write a print processor or a print monitor. The
print processor sample in the DDK is called genprint and the sources are
almost identical to the inbox print proc that MS ships called winprint.
So this gives you a pretty good start.
I would suggest that you explore the app/service angle first and to
settle for the print processor approach only if that doesn’t work for
you. Regarding the printer notifications, refer to the section in the
Platform SDK docs…not the DDK docs which list this function under
print providors. Print providors use printer notifications as well and
writing a print providor is certainly NOT the route that you or anyone
else for that matter should go.
Hope this helps.
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: T.Umapathy [mailto:xxxxx@yahoo.com]
Sent: Tuesday, March 12, 2002 3:06 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to intercept Print Jobs?
Hi Ashwin,
Thanx for your help. Can I create a service with a thread to keep on
checking the print jobs? Is there any other way? Please give me details.
Regards,
T.Umapathy
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%