15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How to use MFC to hook into print server data stream?

Mark A Gregory -- m.gregory@rmit.edu.au
Friday, November 15, 1996

	Environment: NT 4.0 VC++ 4.2b
Hi,

this is a question that is a real doozy,

I want to hook into the print stream of a print server service
running on our NT server.

That is we can connect a printer to the parallel port and then
share the printer on the network.

Users connect to and then print through the print server.

We want to hook into the print data stream as it arrives at the server
and before it gets to the print server service.

Can anyone please tell me how to do this using MFC and Microsoft
Visual C++ 4.2.

thank you
Mark A Gregory





Charles Prineas -- onramp@magna.com.au
Sunday, November 17, 1996

>this is a question that is a real doozy,
>
>We want to hook into the print data stream as it arrives at the server
>and before it gets to the print server service.

Mark,

What you really want to do is write your own print processor.
By default, NT uses WINPRINT as the print processor. The file WINPRINT.DLL
located in the \WINNT\SYSTEM32\SPOOL\PRTPROCS\W32X86\ directory, does all the
work.

Details on how to write print processors (including the source code to
WINPRINT) is found in Microsoft's Device Driver Kit which comes with MSDN.

Note that the above applies to NT 3.51. I can't speak for NT 4, but I'd 
imagine it would be the same.

Regards,             |  http://www.prineas.com/
Charles Prineas      |  Resources for Real Programmers




| Вернуться в корень Архива |