The printer driver will add a Messaging Interface ID to the name of the Messaging Interface. The Printer Driver’s Messaging Interface ID is stored in the BlackIceDEVMODE structure, so different Users and applications in the same windows session can use different Messaging Interface IDs. The printer driver Messaging Interface ID is not the same as Windows User’s Session ID. The printer driver Messaging Interface ID can be an arbitrary positive number; it does not have to be the same as the user’s Windows Session ID. Multiple users or applications and even the whole system can share a single Messaging Interface ID. If the Messaging Interface ID of a print job and the Messaging Interface ID specified by the application that is capturing the messages do not match, the application will not be able to capture any messages.
Before Printer Drivers version 13.82, the printer driver Messaging Interface ID was NOT the same as the Windows Session ID, it was set to 0 by default. With printer driver version 13.82, the printer driver Messaging Interface ID can be preconfigured to be the same as the Windows User’s Session ID. Printing from shared printers to the host, the Messaging Interface ID must be set to 0. When printing from a client to the host, the printer driver runs/executed under System account.
If the printer driver’s UseWindowsSessionID* key is set to “No” in both INI files of the printer driver, then the Printer Driver will use the number specified in the SessionID (this INI file flag specifies the Messaging Interface ID) flag in the INI file for every print job.
If the printer driver’s UseWindowsSessionID* key is set to “Yes” (this is the default setting) in both INI files of the printer driver, then the driver will ignore the SessionID INI file flag and use the current user’s Windows Session ID instead.
A custom installer can be created for the OEM Printer Drivers, using the Printer Driver Resource Toolkit, with a modified printer driver INI file by setting UseWindowsSessionID* to “No” and setting the SessionID key to a positive number. By default, the OEM Printer Driver will use the Windows User’s Session ID for every user.
When the Message Capture is started, Messaging Interface ID is specified in the Message Capture to receive the messages from the printer driver. By default, the driver is set to use the Windows Session ID. The Messaging Interface IDs used by the Printer Driver can also be changed but it is recommended to just get the current Messaging Interface ID (SessionID flag in the INI file) configured, by default in the printer driver, and use that in the application for capturing the messages. The printing application and the application capturing the messages should execute in the same Windows Session.
Please Note: The printing application can change the printer driver Messaging Interface ID.
Please Note: The printing application and the application capturing the messages do not need to execute in the same User session if the UseWindowsSessionID* key is set to “No”.
For a sample implementation of the Messaging Interface ID, please see the Message Capture C++, C#, VB.NET or Delphi samples.
Using Session ID in the Printer Driver
Specifying the Messaging ID in the Message Capture Application
Examples for using the messaging interface with the Messaging Interface ID.
The value of the printer driver UseWindowsSessionID* key should be set to “Yes”, User Session A,B,C, receives the messages.
If two applications, in the same User Account A, need a unique messaging interface, then the printing applications need to set up the Message Interface ID in the devmode structure (BlackIceDEVMODE.SetSessionID method). For example: App1 sets the Message Interface ID to 1, then App2 must set the Message Interface ID different number such as 2. UseWindowsSessionID* key should be set to “No”.
If multiple User Accounts (A,B,C) are printing and “App 1” is capturing the messages in a service, the Messaging Interface ID should be 0 or a positive number. UseWindowsSessionID* key should be set to “No”.
*For more information about UseWindowsSessionID and Messaging Interface ID (SessionID flag in the INI file) settings please see the Description of the INI file values section in the manual.