It might be possible. I know that this method (or something very
similar) works for monolithic drivers. I am just guessing that it would
work for a plugin.
First, you would rename the original drivers rendering dll to something
like “OriginalRenderingDLL.DLL”. Then you would copy your rendering dll
into the printer driver directory, giving it the name of the original
drivers rendering dll. By doing this, you have replaced the rendering
DLL of the original driver with one of your own.
In your rendering dll, in the IPrintOemUni::EnableDriver method, you
would load the original dll and call it’s EnableDriver method. You
would save it’s DRVENABLEDATA structure. You would return a
DRVENABLEDATA structure which has all of YOUR required entry points
enabled, as well as every entry point the original drivers rendering dll
enabled.
Your rendering dll would have to implement every possible DDI function,
and all methods of IPrintOemUni/IPrintOemUni2. In each one, you would
do what you want to do (which might be nothing), then call the original
dlls implementation. For something in a DRVENABLEDATA structure, it’s
just calling thru a pointer. I’m not sure how you would do
IPrintOemUni* methods, or if it’s even possible.
Also, you might need to load the original dll somewhere other than
enabledriver, I’m not sure.
[This idea is not original with me, I learned it at the Paul Yao printer
drivers course.]
ScottR
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pankaj Adlakha
Sent: Thursday, July 06, 2006 8:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Question regarding Rendering Plug In for Printer Driver
For each printjob fired I have to save the printed data in the form of a
bitmap,
I understand that for this purpose I need to write a rendering plug-in.
I have seen the DDK example for bitmap driver. But it is installed as a
separate printer.
THE SCENARIO THAT I WANT TO CREATE IS:
I shall write a rendering plugin which will collect the bitmap data in
the ImageProcessing function, and then save it as a bmp file in the
DrvEndDoc function.
The rendering plugin dll is to be placed in the already existing printer
driver stack, so that it can be used by the installed printer, and for
any print job fired for that printer, the bitmap file of the data
printed is created along withe printouts. Is this thing possible? If yes
then how?
Thanks & regards
Pankaj
Yahoo! India Answers: Share what you know. Learn something new Click
here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here —
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer