Pipe Message Capture Sample
Version number:

BuyBuy Now DownloadDownload

All of the Black Ice Printer Drivers include a messaging interface. The printer drivers communicate with applications through this interface by sending printer messages at different stages of the printing process. The applications capture the messages sent by the printer driver and process them.

The printer driver will send messages when the following events happen during the printing process:

  • Start of Document (StartDoc)
  • Start of Page (StartPage)
  • End of Page (EndPage)
  • End of Page (EndPage)
  • End of Page (EndPage)
  • Image passed in Memory
  • Abort

The driver communicates with an application three different ways:

  • Method 1: Through the WM_COPYDATA Windows message
  • Method 2: Through a registered window message
  • Method 3: Through a pipe interface (for Terminal Server printer drivers)

The Pipe Message Capture sample demonstrates Method 3: how to capture the printer driver messages using Windows Pipes.

This method type is necessary because some operating systems, e.g Vista, or windows 2008 can only use this type of messaging interface. Also in case of printing through remote desktop connection Black Ice recommends using the pipe method.

To help Visual Basic, Delphi or other developers, the Resource Toolkit includes the BiPrnDrv.OCX that makes the process of capturing printer driver messages easy. The OCX will capture every printer driver message internally and will fire an OCX event for every message.

Source code for the Pipe Message Capture without a Form Sample is available in C++. Using the Start Application feature of the Black Ice printer drivers along with the messaging interface provides a straightforward method of monitoring the printing process.



Back to Sample Comparison Chart page