Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Printing    [ Add a report in this area ]  
Report #:  61275   Status: Closed
EPrinter Exception on Vista with UAC
Project:  Delphi Build #:  11.0.2804.9245
Version:    11.0 Submitted By:   Michael
Report Type:  Crash / Data loss / Total failure Date Reported:  4/22/2008 6:32:03 AM
Severity:    Infrequently encountered problem Last Updated: 9/15/2012 5:19:44 AM
Platform:    All versions Internal Tracking #:  
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
"Exception EPrinter in module Project1.exe at 00033B42. Printer selected is not valid" occurs on Windows Vista with UAC (User Account Control) on starting program. There is no problem if I turn UAC off.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

Markus Humm at 4/22/2008 12:10:26 PM -
Please provide more information about your system, does it happen on other Vista PCs as well?

Michael at 4/24/2008 3:31:04 AM -
More info:
"Exception EPrinter in module Project1.exe at 00033B42. Printer selected is not valid" occurs on Windows Vista(32 & 64) with UAC (User Account Control) on starting program. There is no problem if I turn UAC off. It happens on other Vista PCs as well. The program was compiled with Delphi 2007 with QR 4.07 Prof. (but the same error is also in Delphi 6). The last instruction is "if DevMode <> nil then FreeMem(DevMode);" in QrPrnt.pas, line: 2888, procedure: TPrinterSettings.GetPrinterSettings, inner procedure: Gprinter.

Markus Humm at 6/18/2008 11:27:14 PM -
Hello,

could you please include this additional info in your description as these comment's aren't automatically transferred into the internal system.
I'm really tempted to mark it as "needs attention" the step before open.

Dick Boogaers at 4/25/2008 2:39:27 AM -
This error cannot be in Delphi 6 because the QrPrnt.pas file is not part of it.
Also, a procedure GetPrinterSettings occurs nowhere in the VCL source.

Tomohiro Takahashi at 8/5/2008 9:34:50 PM -
Please attach sample project.

Philippe Jean dit Bailleul at 12/18/2009 7:27:21 AM -
Most of those error or caused either by DeviceMode not updated when changing PrinterIndex or by DeviceMode.dmSize taking into account privates properties.
Updating DeviceMode.dmSize with SizeOf(TDeviceMode) before calling CreateIC or CreateDC in the SetState method solve the problem

Server Response from: ETNACODE01