System.AccessViolationException from System.Windows.Forms.PrintDialog  
Author Message
Marvin Steakley





PostPosted: .NET Base Class Library, System.AccessViolationException from System.Windows.Forms.PrintDialog Top

I consistantly get this bomb when the unextended default dialog is pointed to a particular printer driver, namely, the HP LaserJet 4000 Series PCL 6. I get this bomb from both the OK and Properties buttons. This makes all of .Net printing dead on this particular printer model.

It is my strong suspicion that the .Net framework is allocating space for the low-level control block DEVMODE in a fixed size that is too small for this driver. The Windows API documentation says the size of this control block is variable to whatever size the driver's designer chooses and application code should call a special version of DocumentProperties to get the proper size.


.NET Development17