Windows Vista, Windows 7 and Windows Server and later Servers To run an elevated command prompt under Windows Vista, Windows 7 and the Windows Server and later family of operating systems see sample screenshot below : Click Start In the search box type in command Right-click 'Command Prompt' in the search results list Click 'Run as administrator' from the popup menu If you are not an administrator of the computer a dialog box will be shown prompting for the administrator password Windows 8 Also works with Windows Vista, 7 and Servers and later if you start at step a.
To run an elevated command prompt in Windows 8 start at step a. Last Modified: 1 May Last Modified By: Administrator. Article has been viewed , times. Send by email Print Article. In this case, we traced the call to DocumentProperties which is used to retrieve properties of a selected printer.
There are two calls. The first call is a simple request for the size of the DEVMODE structure that the printer driver will need to fill with that printer's properties.
The application uses the size to allocate memory for the properties which are filled in by a second call to DocumentProperties. It is the first call that fails, no matter which printer is selected. It is a very simple request, and one 32 bit integer value should be returned in the range of to or so. A -1 is returned, when the bug manifests itself. A call to 'GetLastError ' does not indicate any error.
Microsoft also provides a 'PrintDlg ' method in a comdlg These are hints for the Microsoft programmers to check. I don't see a whole lot of code to check.
Since all printers fail, when the bug manifests itself, then the software code 'to' and 'back' from the printer driver call needs to be reviewed. Tuesday, November 18, AM. Thursday, November 20, PM. I agree that there's a problem. I have a standard PrintDlg call that has been working flawlessly for years, that is now causing problems on some Vista Ultimate computers, actually crashing the process. The call to OpenPrinter returns a printer 'handle' value, and I would presume it is ok.
We have also confirmed that lowering execution 'elevation' down from 'administator', the 'bug' 'goes away'. This is clearly a Windows issue and not application program trying to print. I have seen the entire printer list disappear occasionally after re-connecting locally to a session that had been connected to via remote desktop.
When this happens, are your printers available to other apps and do they still appear in the list of printers in Start Settings Printers? This always succeeds. The text string for 'printer name' selected from that list is passed to OpenPrinter.. It is the next call to DocumentProperties.. And it fails regardless of the printer selected from the list obtained from Windows via ::EnumPrinters.. The alternative more convenient call to Windows PrintDlg.. And returns the error mentioned in previous posts.
This implies that DocumentProperties.. I currently don't have direct access to laptop that demonstrates the bug. I have asked my associate, who owns the laptop, regarding any problems with the printer list in the 'control panel'. There has been no mention of any such problem. It would seem logical, to me at least, that the problem you are having with missing printers from the control panel list, could be explained by the DocumentsProperties problem we are suffering.
Thought, I would think all the printers would be missing from the control panel list, since when we suffer the problem, all the printers listed via EnumPrinters would fail on call to DocumentsProperties ; the 1st call to get size of DEVMODE record for in preparation for 2nd call to DocumenProperties to fetch a printer's properties. The more I think about the problem, it seems to be an unitialized variable, and that location in memory may have some proper initialization, usually 0, or some improper value that triggers the bug.
Just 'luck of the draw'. I wish the folks at Microsoft could see the problem for themselves. Friday, November 21, PM. The printing problem noted in this forum affects some of Microsoft's own programs.
And other well known programs Adobe. From Intuit forum there are these printing problem with Quicken Does Microsoft have any forum moderators to take notice of this problem?
Saturday, November 29, AM. Wednesday, December 3, PM. Friday, January 2, PM. I have this problem but what I have noticed and I have not read anywhere yet is on my system, all I have to do is restart my application and the printers work again. All rights reserved. Information and prices contained in this website may change without notice.
Terms of use. Please email webguru cadzow.
0コメント