I have .NET3.5 Windows Service application which prints Crystal Reports and
once in a while I get the following error, if I try to print right after the
error everything works just fine. Does anyone know what might be causing
this problem?
The error is occuring at CrystalReport.Print(String printer, Int32 copies,
Boolean collated, String paperSource) line
Thank You
Peter
System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.PrintDlg(PRINTDLG X86 lppd)
at System.Drawing.Printing.PrinterSettings.GetOutputP ort()
at System.Drawing.Printing.PrinterSettings.FastDevice Capabilities(Int16
capability, IntPtr pointerToBuffer, Int32 defaultValue, String printerName)
at System.Drawing.Printing.PrinterSettings.Get_PaperS ources()
at System.Drawing.Printing.PrinterSettings.get_PaperS ources()
at CrServer.CrystalReport.Print(String printer, Int32 copies, Boolean
collated, String paperSource)