oddly if I right click on a file and use the "print" verb, the capture works and Data contains the file, but if I open the application and print to the driver I get the byte[]{0}
to recreate this problem (it is in multiple apps) I modified the CSharpMSGCapture Solution by adding:
- Code: Select all
void BiPrnDrv_MemoryImage(ref object Data, int Size)
{
ListBox.Items.Add("MemoryImage message was received.");
ListBox.Items.Add("The size is: " + Size);
ListBox.SelectedIndex = ListBox.Items.Count - 1;
}
and changing this method:
- Code: Select all
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
BiPrnDrv = new BIPRNDRVLib.BiPrnDrv();
// Add event handlers
BiPrnDrv.StarDoc += new BIPRNDRVLib._DBiPrnDrvEvents_StarDocEventHandler(BiPrnDrv_StarDoc);
BiPrnDrv.StartPage += new BIPRNDRVLib._DBiPrnDrvEvents_StartPageEventHandler(BiPrnDrv_StartPage);
BiPrnDrv.EndPage += new BIPRNDRVLib._DBiPrnDrvEvents_EndPageEventHandler(BiPrnDrv_EndPage);
BiPrnDrv.EndDoc += new BIPRNDRVLib._DBiPrnDrvEvents_EndDocEventHandler(BiPrnDrv_EndDoc);
BiPrnDrv.MemoryImage += new BIPRNDRVLib._DBiPrnDrvEvents_MemoryImageEventHandler(BiPrnDrv_MemoryImage);
//szIniFile = Application.StartupPath + "\\SampleSettings.ini";
}
