For more information about how to use the Messaging Interface and how to change values of the DEVMODE Structure, please see the Message Capture C+ +, C#, VB.NET or Delphi sample and the Sample for Changing the Output Directory C++, C#, VB.NET samples.
If the application is started by the Printer Driver’s “Start Application Before Printing” feature, it is started at the BLACKICE_MESSAGE_STARTDOC event and the printer driver will not wait for the application. This means the application will not receive the first BLACKICE_MESSAGE_DEVMODE message, and depending on how fast it starts and how fast the printing progresses, it might not receive any messages at all.
Therefore if one wants to use the Messaging Interface from an application started by the printer driver, the application must be started using the “Start for Messaging” option or must run in the background and wait for the events continuously instead of being started by the Printer Driver. Another option is to use the plugin interface (BiPlugin.dll) instead of the Messaging Interface. (Especially when changing settings like file type and output directory or filename, which must be set at the first time the BLACKICE_MESSAGE_DEVMODE event fires)
To make the Printer Driver wait for the application at every event or to abort the printing process, the plugin interface must be used.
The Save As dialog pops up before the message capture application gets the BLACKICE_MESSAGE_DEVMODE message, therefore the Save As dialog can’t be enabled or disabled in the handler of the BLACKICE_MESSAGE_DEVMODE messages.
To disable the Save As dialog when the message capture application is running, the DisableSaveAsOption function of the BlackIceDEVMODE DLL or OCX control should be called when the application starts and the EnableSaveAsOption function should be called when the application closes. In this case when the application is running the Save As dialog won’t pop up at printings.