Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members. Set this member to SIZEOF (DEVMODE) to indicate the version of the DEVMODE structure being used. Contains the number of bytes of private driver-data that follow this structure. Apr 17, 2017 Where can I find the definition of the DEVMODE structure used by the Windows Fax printer driver? I would like to be able to use pInfo-mpPD-mpd.hDevMode to change the contents of the DEVMODE structure in the OnPreparePrinting method of the CView subclass in the MFC Windows application that I'm developing in Visual C.
- Devmode Structure Printer Driver Downloads
- Hp Printer Drivers For Windows 10
- Devmode Printer
- Devmode Structure Printer Driver Download
The driver version number assigned by the driver developer. Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members. Set this member to sizeof (DEVMODE) to indicate the version of the DEVMODE structure being used.
ReportBuilder 14.07 Ent, Advantage Database, Delphi XE2
I have an end user report application where reports are loaded from file.
They preview and print to file correctly but will not print to a printer
coming up with the following message 'Windows cannot print due to a problem
with the current printer setup.' I could not see anything wrong with any
printer settings so compared the .rtm file with another application where i
do not have any problem. It was immediately obvious that the problem
reports all had a PrinterSetup.DevMode setting (see below) whereas my good
ones do not. If i remove that section then the report prints no problem.
However if i go back in and change the report the section gets reinstated
and i am back to the printing problem.
I can guess from the name that PrinterSetUp.DevMode is something to do with
development (?) but why does it appear and more importantly how can i avoid
it?
Thanks
Tim Murfitt
object repPlayer: TppReport
PassSetting = psTwoPass
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.Orientation = poLandscape
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.SaveDeviceSettings = True
PrinterSetup.mmMarginBottom = 10000
PrinterSetup.mmMarginLeft = 10000
PrinterSetup.mmMarginRight = 10000
PrinterSetup.mmMarginTop = 10000
PrinterSetup.mmPaperHeight = 210000
PrinterSetup.mmPaperWidth = 297000
PrinterSetup.PaperSize = 9
PrinterSetup.DevMode = {
B4080000430061006E006F006E0020004D004700360031003000300020007300
6500720069006500730020005000720069006E00740065007200200028004300
000000000104060CDC00D80703DF8103010009009A0B3408640001001401FDFF
0200010000000100010041003400000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0100000002000000010000000100000000000000000000000000000000000000
D8070000424A444D060C00000000000044040000AD000000AD00000000000000
000000000100000008520000047400002C01000054010000604F0000E4700000
2C01000054010000604F0000E470000008520000047400002C01000054010000
54010000F4010000604F0000E47000002C0100005401000054010000F4010000
2C0100005401000054010000F4010000604F0000E47000005802580218004400
5200410046005400000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000530061006D0070006C00650020003100000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000001027000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000020000000300000003000000000000000200010000000000
0000000000000000000000000000020003000900090000000300000003000000
0200000000000000000000000000000000000000010000000100000003000000
1401000003000000000000000100000000000000000000000000000000000000
0000000003000000020000000100000000000000010000000000000000000000
6400000009000000085200000474000000000000090000000852000004740000
0000000002000000000000000100000001000000000000000000000000000000
0000000000000000000000000000000000000000930000000000000000000000
480A000001000000010000002C00000000000000000000000000000001000000
0000000001000000FFFF00000000000000000000000000000A00000000000000
0000000000000000000000000100000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000001000000
00000000FFFF0000000000000000000000000000020000000000000000000000
0000000001000000000000000100000000000000000000000000000000000000
00000000085200000474000000000000010000007F0000007F0000007F000000
7F00000000000000010000000000000000000000E7030000FF00000000000000
0000000000000000000000000000000000000000000000000000000001000000
0000000000000000000000000B01000001000000090000000000000000000000
000000000000000000000000000000000B010000000000000000000000000000
0100000000000000000000000A00000000000000000000000000000000000000
E703000000000000000000000000000000000000000000000000000000000000
0000000005000000000000000000000002000000000000000200000001000000
0000000000000000000000000000000000000000E80300000000000001000000
000000000000000000000000000000000000000000000000430061006E006F00
6E0020004D004700360031003000300020007300650072006900650073002000
5000720069006E007400650072002000280043006F0000000104060CDC00D807
03DF8103010009009A0B3408640001001401FDFF020001000000010001004100
3400000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010000000200000001000000
0100000000000000000000000000000000000000723850DE}
Template.FileName =
Comments
Devmode Structure Printer Driver Downloads
- edited May 2013After further experimenting i have discovered that if i edit the .rtm to
include PrinterSetup.DevMode = {00000000} then i can print ok and the
setting does not get overwritten when the report is modified. I have
therefore half resolved my problem (i can print) but i am still left with
the problem of having to edit the .rtm file.
Any one with ideas how i can completely resolve the problem?
Thanks
Tim Murfitt - edited May 2013In the Report properties below, I notice
PrinterSetup.SaveDeviceSettings = True
Use the object inspector to set SaveDeviceSettings to False. Save the
report and again do a View | As Text and the DevMode should no longer
appear. If you modify the PrinterSetup.DeviceSettings then
SaveDeviceSettings will flip to True. The DeviceSettings property should
only be used to set printer model specific features, like stapler, etc.
The Windows API 'DevMode' structure is used by Windows and the Printer
Driver to define the printer setup. The name DevMode is short for
DeviceMode.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com - edited May 2013
The DEVMODEW structure is the Unicode version of the DEVMODE structure, which is described in the Microsoft Windows SDK documentation. (The 'W' suffix on DEVMODEW stands for 'wide', or Unicode characters.) While applications can use either structure, drivers are required to use the DEVMODEW structure rather than the DEVMODE structure.
Public and Private Members
Immediately following a DEVMODEW structure's defined members (often referred to as its public DEVMODEW members), there can be a set of driver-defined members (its private DEVMODEW members). The following figure shows the public section (the actual DEVMODEW structure itself) and the private section.
Normally, the private members are used only by printer drivers. The driver supplies the size, in bytes, of this private area in the dmDriverExtra member. Driver-defined private members are for exclusive use by the driver.
For printer drivers, the DEVMODEW structure is used to specify user choices for a print document. It is also used to specify default values of these choices for printers, such as the number of copies to print, paper size, and other attributes. For display devices, the DEVMODEW structure specifies display attributes such as the number of bits per pixel, pixel dimensions, and display frequency.
Initializing a DEVMODEW Structure
Depending on whether it is to be used by a display driver or by a printer driver, a DEVMODEW structure is initialized in two different ways.
Display driver DEVMODEW initialization
A display driver's DrvGetModes entry point initializes all members of the DEVMODEW structure to zero. DrvGetModes then copies the name of the display driver DLL to the dmDeviceName member, fills in the dmSpecVersion and dmDriverVersion members with the version of the DEVMODEW structure, and copies display attribute information to the appropriate members.
Printer driver DEVMODEW initialization
When an application makes a call to either DocumentProperties (a printer interface DLL function that is described in the Microsoft Windows SDK documentation) or DrvDocumentPropertySheets (an NT-based operating system graphics DDI), a DEVMODEW structure is created with default values. An application is then free to modify any of the public DEVMODEW members. After any changes, the application should then make a second call to the same function it called before, in order to merge the changed members with those of the driver's internal DEVMODEW structure. The second call is necessary since some changes may not work correctly; the printer driver must be called to correct the DEVMODEW structure. When the document is about to be printed, the application passes the merged DEVMODEW structure to CreateDC (described in the Microsoft Windows SDK documentation), which passes it on to the DrvEnablePDEV DDI. At that time, the driver's rendering DLL validates the DEVMODEW structure and makes repairs, if necessary, before carrying out the print job.
Using a DEVMODEW Structure
Several APIs and graphics DDIs use the information in the DEVMODEW structure for such purposes as printing, querying device capabilities, showing user interface, and others. For example, DrvConvertDevMode is a print spooler graphics DDI that translates the DEVMODEW structure from one operating system version to another. This might be necessary if a printer driver gets a DEVMODEW structure from another machine that is running on a different operating system version.
Modifying a DEVMODEW Structure
Applications and drivers are free to ask for a DEVMODEW structure and modify its public part directly. Only drivers, however, are permitted to modify the private DEVMODEW structure members.
In order to modify private DEVMODEW structure members, a driver must first determine the offset of the beginning of the private data. Given a pointer to the beginning of this structure, and the dmSize member, which holds the size of the public portion of the structure, the beginning of the private portion can be found. The following example shows how to initialize a pointer to the beginning of the private section. In this example, pdm points to the beginning of the DEVMODEW structure.
Printer Driver/Display Driver DEVMODEW Differences
The DEVMODEW structure members fall into three categories:
Hp Printer Drivers For Windows 10
Members used only by printer drivers
Members used only by display drivers
Members used by both printer and display drivers
The following table lists several public DEVMODEW members that are used only by printer drivers:
Used Only by Printer Drivers | Purpose |
---|---|
dmScale | Specifies the percentage by which the image is to be scaled for printing. |
dmCopies | Specifies the number of copies to be printed. |
dmColor | Specifies whether a color printer should print color or monochrome. |
dmOrientation | Specifies the orientation of the paper, either portrait or landscape. |
The next table lists several public DEVMODEW members that are used only by display drivers:
Devmode Printer
Used Only by Display Drivers | Purpose |
---|---|
dmBitsPerPel | Specifies the color resolution, in bits per pixel, of the display device. |
dmPelsWidth | Specifies the width, in pixels, of the visible device surface. |
dmPelsHeight | Specifies the height, in pixels, of the visible device surface. |
dmDisplayFlags | Specifies the display mode - color versus monochrome, interlaced versus noninterlaced. |
dmDisplayFrequency | Specifies, in hertz, the display's refresh rate. |
Devmode Structure Printer Driver Download
The third table lists several public DEVMODEW members that are used by both printer and display drivers:
Used by Printer and Display Drivers | Purpose |
---|---|
dmDeviceName | For displays, specifies the display driver's DLL. For printers, specifies the 'friendly name' of the printer. |
dmFields | Specifies bit flags identifying which of the DEVMODEW members that follow it are in use. For example, the DM_BITSPERPEL flag is set when the dmBitsPerPel member contains valid data. |
dmSize | Specifies the size, in bytes, of the public portion of the DEVMODEW structure. |
dmDriverExtra | Specifies the number of bytes of private driver data following the public structure members. For display drivers, this is usually zero. |