![]() |
| |||||||
| Notices |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | |
| Hi all I've done a cross post on this reply tomyself(!) because I cant find an appropriate group to post this on. OK i've dug a bit futher an can confirm that when I use GetPrinter to get the PRINT_INFO_2 data from the printer is the duple mode is set the correct value is returned If it is not set the I change the DevMode.dmDuplex value and then pass it through DocumentProperties Move (DocumentProperties(0,hPrinter,AddressOf(sPrinterN ame),ppi2.pDevMode,ppi2.pDevMode,(DM_IN_BUFFER+DM_ OUT_BUFFER))) to iFlag When it comes out the other side of this dmDuplex is still set how I set it I then call SetPrinter with the full PRINT_INFO_2 data and it returns non zero ie succeeds Move (SetPrinter(hPrinter,2,pPI2_Data,0)) to iFlag BUT the duplex value when I go and check in the property panel of the printer has not changed ???? Any help with this would be greatly appreciated ! Thanks Andrew "Andrew Kennard" <b@a.com> wrote in message news:uK9izi1ZIHA.4172@TK2MSFTNGP02.phx.gbl... Quote:
| Guest
Posts: n/a
| |
|
| | #2 (permalink) | ||
| Well, have you tried peeking at the documentation in the SDK? It sometimes actually helps. The keys to your success on setting the global and personal default settings, are the level 8 and 9 PRINTER_INFO_* structures. Check out the "SetPrinter" section and the "Per-User DEVMODE" section in the SDK. Also try reading the "DocumentProperties" section. DocumentProperties has nothing to do with setting default settings. If you set duplex in the pDevModeInput it is also set in pDevModeOutput, unless the printer does not support duplexing. By calling DocumentProperties you give the driver the opportunity to fix/update/merge the changed members with those of the driver's internal DEVMODE structure. The call is necessary since some changes may not work correctly; the printer driver must be called to correct the DEVMODE structure. When the document is about to be printed, your application chould pass the merged DEVMODE structure to CreateDC If you want to set the printer (while printing) to simplex, you should set the DM_DUPLEX flag and specify DMDUP_SIMPLEX for the dmDuplex member. Or else the driver will use it's driver internal default duplex setting (which probably is simplex for standard printer drivers) -- Christoph Lindemann "Andrew Kennard" <b@a.com> wrote in message news:%23hPxKi%23ZIHA.5784@TK2MSFTNGP03.phx.gbl... Quote:
| Guest
Posts: n/a
| ||
|
| | #3 (permalink) | |||
| Christoph Thanks VERY much for the pointer ! I was fooled by the KB article entitled "How To Modify Printer Settings by Using SetPrinter" ..... doesn't actually change anything ! I've now read both your suggested sections (properly!) and provisionally have got it to work now that i'm doing it correctly ! Would I be correct in assuming that if I use the PRINTER_INFO_9 to change the personal defaults this would work best with a network shared printer as opposed to the global PRINTER_INFO_8 ? Thanks again for all your assistance Kind Regards Andrew "Christoph Lindemann" <clindemann2@newsgroups.nospam> wrote in message news:eWo1oyJaIHA.208@TK2MSFTNGP02.phx.gbl... Quote:
| Guest
Posts: n/a
| |||
|
| | #4 (permalink) | ||
| "Andrew Kennard" <b@a.com> wrote in message news:%23w9IycKaIHA.5900@TK2MSFTNGP02.phx.gbl... Quote:
from an account that is NOT administrator. Some thoughts: As a normal user, you might only have access to set your personal settings. When changing the global settings (level 8) it will change the "global" settings on your local machine (I think), but it might also be that the global settings are changed on the server (the machine where the printer is attached) globally. Also there might be a difference depending on if the global settings are set from a local administrator or domain administrator.... Quote:
Regards, Christoph | Guest
Posts: n/a
| ||
|
![]() |
| Tags |
| None |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing default path of "My Documents" (User files)to D: drive? | math | Windows Vista File Management | 4 | 07-17-2007 12:12 AM |
| changing a users "default" directory. | Bruce Bowler | Windows XP Configuration & Management | 2 | 01-12-2005 12:19 PM |
| How do I get the "Username" and "Password" prompt when connecting to other WINXP computers on my home network? | Doug Williams | Windows XP Work Remotely | 1 | 01-28-2004 10:47 AM |
| Changing default location of "Documents and Settings Folder" | GMB | Windows XP Basics | 2 | 07-24-2003 02:37 AM |
| Changing default directory for "Documents and Settings" folder | Keith | Windows XP Setup | 0 | 07-16-2003 10:10 PM |