Our program is crashing whenever the user brings up the Windows print dialog via PrintDlgEx when a particular printer is the default printer. If that printer is not the default, everything is fine, unless the user selects that printer from within the dialog, in which case the dialog immediately crashes.
The printer is an HP LaserJet Pro 400 M451nw, and the problem occurs with multiple computers on the same network trying to access that printer. However, other programs can print to that printer, including Notepad. The computers are running 32-bit Windows 7; the program is written in VS C++.
Here is the code:
PRINTDLGEX printer = { 0 };
printer.lStructSize = sizeof( printer );
printer.hwndOwner = my_win;
printer.Flags = PD_RETURNDC | PD_NOPAGENUMS | PD_NOCURRENTPAGE | PD_USEDEVMODECOPIES;
printer.nCopies = 1;
printer.nStartPage = START_PAGE_GENERAL;
PrintDlgEx( &printer );
Here is what the customer sent me:
Any idea as to what could cause such a crash, or how we would go about figuring it out?