[WinPrnDev] Hi, may be I need a solution for a port monitor.

  • From: "旭日" <summy00@xxxxxx>
  • To: "winprndev" <winprndev@xxxxxxxxxxxxx>
  • Date: Mon, 30 Jun 2014 15:37:20 +0800

Hi, 
I am new to wirte windows driver, I need a program that can do some print 
function in WinXP & Win7.


My requirement:
User click 'Print' button in any software can implement the following jobs:
1. Save the print job to pdf/jpeg/bmp on hard disk.
2. Send this print job to the printer and print.


My situation:
1. I am  not familiar with WDK7.1's print monitor sample 
debugging(VS2013+WDK8.1 is simple, solution file is in the sample, I can use 
debugger inside vs2013.) 
2. I have read the 
http://www.codeproject.com/Articles/8916/Printing-Architecture & some MSDN 
Reference for 2 weeks.


I want to know:


1. Following the msdn's WDK Port Monitor samples, but I don't know where to 
grab the print content, acorrding to msdn, port monitor send raw data to 
kernel-mode port driver,
1) I know the LcmStartDocPort() calls CreateFile(), LcmWritePort() calls 
WriteFile(), it seems these 2 function do the communication to the "kernel-mode 
port driver"?
2) it seems I need grab this raw data & save it to the local disk?


2. Do the Print Monitor or Print Processor can do this?( I think may be 
Processor, because it can convert emf to raw with GDI & print driver API, I was 
in wrong direction.)‍


3. Any suggestion for my studying print driver?‍


Thank you!!


summy00
2014.06.30

Other related posts: