SessionID Property

This property can be used for getting/setting the session ID used in the messaging interface name manually. (The SessionID is the session identifier (session ID), a unique identifier that is generated by the server when the session is created.)

This property is only used for Windows servers. If this property is not specified the StartCapture method gets the session ID automatically from the operating system. The value of the SessionID must be a positive integer value.

 

Note: Use the SetSessionID method of BlackIceDEVMODE for specifying the session ID in the printer driver. After the session ID is set in the printer driver, one can use this ID at the SessionID property.

 

The session ID can be set manually through the INI file, if the printer driver messages is process in a windows service or through remote desktop connection.

 

Setting the Session ID - Using the Message Capture on Windows Server Systems

 

On Windows Server Systems (Terminal Servers), the printer driver will add a Session ID to the name of the Messaging Interface. The Session ID can be an arbitrary number but it is recommended to be set to the Windows Session ID used by the client application (the application capturing the messages). If one chooses another number it is important to set the Session ID in both the Printer Driver and in the Message Capture DLL or ActiveX control every time you start the message capture. If the Session IDs do not match, the application will not be able to capture any message.

 

Setting the Session ID using the BiPrnDrv.OCX Message Capture ActiveX Control and the BlackIceDEVMODE.OCX ActiveX Control

 

When using the pipe interface with the StartCapture method of the BiPrnDrv.ocx ActiveX control, one has to take the following steps:

 

The SetSessionID function call sets the SessionID member of the extended Devmode structure. By doing this it passes the ID to the Printer Driver.

The second parameter of StartCapture should be 3 (MESSAGE_CAPTURE_METHOD_PIPE).

 

For a sample implementation, please see the Message Capture C# or VB.NET samples.