Can NT 4.0 Printer Driver Perform File I/O?

Can NT 4.0 Printer Driver Perform File I/O?

Post by Steve Bockma » Sun, 29 Nov 1998 04:00:00



I am writing a new complete printer driver (based on the PSCRIPT driver) for
Windows NT 4.0, and would like to be able to open and output to one or more
logging files.

I have attempted to use the Zw... functions (e.g. ZwCreateFile, ZwWriteFile)
without success.

Could someone please clue me as to the proper way to perform file I/O from a
printer driver?

 
 
 

1. Porting Win95 printer driver & port monitor to NT 4.0

Hi all,

        I've written a Windows 95 printer driver, port monitor and VxD to drive a
card printer. Now, the printer uses a slightly odd communication method -
it uses a combination of a COM port and direct I/O mapped port I/O, so
under the approach I followed under win95 was as below :

        1. Created minidriver with unitool.
        2. Hooked into STARTDOC, NEXTBAND, ENDDOC and ABORTDOC.
        3. Wrote port monitor & VxD to handle communication COM port and I/O
ports.

        I hooked into STARTDOC, NEXTBAND, etc because I needed to do some
pre-processing (convert to CMYK, dithering and so on) on the image data.

        Now I need to write an NT version of the drivers and I'm a little unsure
as to how to proceed, well, from the relevant section in NT DDK Docs I've
come up with the following 2 possibilities :

        1. Write FULL driver and port monitor (I'd rather not).
        2. Create minidriver, using RasDD, and write a port monitor.

        ATM, option 2 seems the best, but there's a few things I'm not sure about:

        1. Is CBFilterGraphics the only way I can hook into the minidriver ?
        2. Is CBFilterGraphics described in more detail anywhere (I need to know
things like how much of the image will lpBuf point to when CBFilterGraphics
is called (do I get bands or the full image) and exactly what should this
function actually do (do I need to copy the block of memory before changing
it, etc, etc)) ?
        3. Can I just use the port monitor from my '95 driver ?
        4. Where, if needed, can I find more info on NT port monitor development ?
        5. Is there a better source of documentation than the DDK Docs ?

TIA,
--
Scott Hill

Software Engineer (and all round nice guy)
Author of Pandora's Box
Company homepage : http://www.ddlinks.demon.co.uk

"The best trick the devil ever pulled was convincing people he didn't
exist..."
                                                                - Verbal Kint.

"the Internet is here so we can waste time talking about nothing in
 particular when we should be working" - Marcus Hill.

2. SUN Microsystems Inventory List

3. Looking for FULL raster printer driver source for NT 4.0

4. automount with samba 2.0 and sol2.6

5. Help with developing a simple NT 4.0 printer driver

6. NikonScan

7. Looking for bitmap printer driver source for NT 4.0

8. can't connect with norton

9. NT 4.0 printer driver font rotation

10. Help with writing a Windows NT 4.0 Printer Graphics Driver

11. How to implement own UI of printer driver under NT 4.0

12. DDK printer driver for NT 4.0

13. Windows 98 Drivers Compared with NT 4.0 and 5.0 Drivers