views:

1091

answers:

3

We've got an app with some legacy printer "setup" code that we are still using PrintDlg for. We use a custom template to allow the user to select witch printer to use for various types of printing tasks (such as reports or drawings) along with orientation and paper size/source.

It works on XP and 32-bit Vista, but on Vista x64 it gets a CDERR_MEMLOCKFAILURE via CommDlgExtendedError(). I've tried running it with just the bare-bones input in the PRINTDLG structure, but if the parameters include PD_PRINTSETUP or PD_RETURNDEFAULT, I get that error.

Since the printer selection / page setup has been split into PageSetupDlg and PrintDlgEx, there is no apparent easy transition without changing a fair amount of code and/or changing completely how we present printing and printer setup to the user.

Has anyone seen this problem on 64-bit Vista, and have you found any work-arounds?

Notes:
Application runs as Administrator due to other constraints

A: 

I found a post on the Quicken Community forum: Solution to Printing Problems Vista 64 Quicken 2008, and the related FAQ: What if I'm unable to print, or receive "Error communicating with printer"? and the recommendation to use an emulation printer.

crashmstr
+1  A: 

I found a related post on the Microsoft forums: On Vista x64, DocumentProperties fails from UAC-elevated process

I've verified with a sample program that PrintDlg running as non-admin works.

crashmstr
A: 
AZDean