ReactOS  0.4.15-dev-345-g5d88487
devmode.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Spooler API
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Functions giving information about DEVMODE structures
5  * COPYRIGHT: Copyright 2016-2017 Colin Finck (colin@reactos.org)
6  */
7 
8 #include "precomp.h"
9 
10 typedef struct _MINIMUM_SIZE_TABLE
11 {
12  DWORD dwField;
13  WORD wSize;
14 }
16 
21  { DM_PANNINGHEIGHT, FIELD_OFFSET(DEVMODEA, dmPanningHeight) + RTL_FIELD_SIZE(DEVMODEA, dmPanningHeight) },
22  { DM_PANNINGWIDTH, FIELD_OFFSET(DEVMODEA, dmPanningWidth) + RTL_FIELD_SIZE(DEVMODEA, dmPanningWidth) },
23  { DM_DITHERTYPE, FIELD_OFFSET(DEVMODEA, dmDitherType) + RTL_FIELD_SIZE(DEVMODEA, dmDitherType) },
24  { DM_MEDIATYPE, FIELD_OFFSET(DEVMODEA, dmMediaType) + RTL_FIELD_SIZE(DEVMODEA, dmMediaType) },
25  { DM_ICMINTENT, FIELD_OFFSET(DEVMODEA, dmICMIntent) + RTL_FIELD_SIZE(DEVMODEA, dmICMIntent) },
26  { DM_ICMMETHOD, FIELD_OFFSET(DEVMODEA, dmICMMethod) + RTL_FIELD_SIZE(DEVMODEA, dmICMMethod) },
27  { DM_DISPLAYFREQUENCY, FIELD_OFFSET(DEVMODEA, dmDisplayFrequency) + RTL_FIELD_SIZE(DEVMODEA, dmDisplayFrequency) },
28  { DM_NUP, FIELD_OFFSET(DEVMODEA, dmNup) + RTL_FIELD_SIZE(DEVMODEA, dmNup) },
29  { DM_DISPLAYFLAGS, FIELD_OFFSET(DEVMODEA, dmDisplayFlags) + RTL_FIELD_SIZE(DEVMODEA, dmDisplayFlags) },
30  { DM_PELSHEIGHT, FIELD_OFFSET(DEVMODEA, dmPelsHeight) + RTL_FIELD_SIZE(DEVMODEA, dmPelsHeight) },
31  { DM_PELSWIDTH, FIELD_OFFSET(DEVMODEA, dmPelsWidth) + RTL_FIELD_SIZE(DEVMODEA, dmPelsWidth) },
32  { DM_BITSPERPEL, FIELD_OFFSET(DEVMODEA, dmBitsPerPel) + RTL_FIELD_SIZE(DEVMODEA, dmBitsPerPel) },
33  { DM_LOGPIXELS, FIELD_OFFSET(DEVMODEA, dmLogPixels) + RTL_FIELD_SIZE(DEVMODEA, dmLogPixels) },
34  { DM_FORMNAME, FIELD_OFFSET(DEVMODEA, dmFormName) + RTL_FIELD_SIZE(DEVMODEA, dmFormName) },
35  { DM_COLLATE, FIELD_OFFSET(DEVMODEA, dmCollate) + RTL_FIELD_SIZE(DEVMODEA, dmCollate) },
36  { DM_TTOPTION, FIELD_OFFSET(DEVMODEA, dmTTOption) + RTL_FIELD_SIZE(DEVMODEA, dmTTOption) },
37  { DM_YRESOLUTION, FIELD_OFFSET(DEVMODEA, dmYResolution) + RTL_FIELD_SIZE(DEVMODEA, dmYResolution) },
38  { DM_DUPLEX, FIELD_OFFSET(DEVMODEA, dmDuplex) + RTL_FIELD_SIZE(DEVMODEA, dmDuplex) },
39  { DM_COLOR, FIELD_OFFSET(DEVMODEA, dmColor) + RTL_FIELD_SIZE(DEVMODEA, dmColor) },
40  { DM_DISPLAYFIXEDOUTPUT, FIELD_OFFSET(DEVMODEA, dmDisplayFixedOutput) + RTL_FIELD_SIZE(DEVMODEA, dmDisplayFixedOutput) },
41  { DM_DISPLAYORIENTATION, FIELD_OFFSET(DEVMODEA, dmDisplayOrientation) + RTL_FIELD_SIZE(DEVMODEA, dmDisplayOrientation) },
42  { DM_POSITION, FIELD_OFFSET(DEVMODEA, dmPosition) + RTL_FIELD_SIZE(DEVMODEA, dmPosition) },
43  { DM_PRINTQUALITY, FIELD_OFFSET(DEVMODEA, dmPrintQuality) + RTL_FIELD_SIZE(DEVMODEA, dmPrintQuality) },
44  { DM_DEFAULTSOURCE, FIELD_OFFSET(DEVMODEA, dmDefaultSource) + RTL_FIELD_SIZE(DEVMODEA, dmDefaultSource) },
45  { DM_COPIES, FIELD_OFFSET(DEVMODEA, dmCopies) + RTL_FIELD_SIZE(DEVMODEA, dmCopies) },
46  { DM_SCALE, FIELD_OFFSET(DEVMODEA, dmScale) + RTL_FIELD_SIZE(DEVMODEA, dmScale) },
47  { DM_PAPERWIDTH, FIELD_OFFSET(DEVMODEA, dmPaperWidth) + RTL_FIELD_SIZE(DEVMODEA, dmPaperWidth) },
48  { DM_PAPERLENGTH, FIELD_OFFSET(DEVMODEA, dmPaperLength) + RTL_FIELD_SIZE(DEVMODEA, dmPaperLength) },
49  { DM_PAPERSIZE, FIELD_OFFSET(DEVMODEA, dmPaperSize) + RTL_FIELD_SIZE(DEVMODEA, dmPaperSize) },
50  { DM_ORIENTATION, FIELD_OFFSET(DEVMODEA, dmOrientation) + RTL_FIELD_SIZE(DEVMODEA, dmOrientation) },
51  { 0, 0 }
52 };
53 
58  { DM_PANNINGHEIGHT, FIELD_OFFSET(DEVMODEW, dmPanningHeight) + RTL_FIELD_SIZE(DEVMODEW, dmPanningHeight) },
59  { DM_PANNINGWIDTH, FIELD_OFFSET(DEVMODEW, dmPanningWidth) + RTL_FIELD_SIZE(DEVMODEW, dmPanningWidth) },
60  { DM_DITHERTYPE, FIELD_OFFSET(DEVMODEW, dmDitherType) + RTL_FIELD_SIZE(DEVMODEW, dmDitherType) },
61  { DM_MEDIATYPE, FIELD_OFFSET(DEVMODEW, dmMediaType) + RTL_FIELD_SIZE(DEVMODEW, dmMediaType) },
62  { DM_ICMINTENT, FIELD_OFFSET(DEVMODEW, dmICMIntent) + RTL_FIELD_SIZE(DEVMODEW, dmICMIntent) },
63  { DM_ICMMETHOD, FIELD_OFFSET(DEVMODEW, dmICMMethod) + RTL_FIELD_SIZE(DEVMODEW, dmICMMethod) },
64  { DM_DISPLAYFREQUENCY, FIELD_OFFSET(DEVMODEW, dmDisplayFrequency) + RTL_FIELD_SIZE(DEVMODEW, dmDisplayFrequency) },
65  { DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + RTL_FIELD_SIZE(DEVMODEW, dmNup) },
66  { DM_DISPLAYFLAGS, FIELD_OFFSET(DEVMODEW, dmDisplayFlags) + RTL_FIELD_SIZE(DEVMODEW, dmDisplayFlags) },
67  { DM_PELSHEIGHT, FIELD_OFFSET(DEVMODEW, dmPelsHeight) + RTL_FIELD_SIZE(DEVMODEW, dmPelsHeight) },
68  { DM_PELSWIDTH, FIELD_OFFSET(DEVMODEW, dmPelsWidth) + RTL_FIELD_SIZE(DEVMODEW, dmPelsWidth) },
69  { DM_BITSPERPEL, FIELD_OFFSET(DEVMODEW, dmBitsPerPel) + RTL_FIELD_SIZE(DEVMODEW, dmBitsPerPel) },
70  { DM_LOGPIXELS, FIELD_OFFSET(DEVMODEW, dmLogPixels) + RTL_FIELD_SIZE(DEVMODEW, dmLogPixels) },
71  { DM_FORMNAME, FIELD_OFFSET(DEVMODEW, dmFormName) + RTL_FIELD_SIZE(DEVMODEW, dmFormName) },
72  { DM_COLLATE, FIELD_OFFSET(DEVMODEW, dmCollate) + RTL_FIELD_SIZE(DEVMODEW, dmCollate) },
73  { DM_TTOPTION, FIELD_OFFSET(DEVMODEW, dmTTOption) + RTL_FIELD_SIZE(DEVMODEW, dmTTOption) },
74  { DM_YRESOLUTION, FIELD_OFFSET(DEVMODEW, dmYResolution) + RTL_FIELD_SIZE(DEVMODEW, dmYResolution) },
75  { DM_DUPLEX, FIELD_OFFSET(DEVMODEW, dmDuplex) + RTL_FIELD_SIZE(DEVMODEW, dmDuplex) },
76  { DM_COLOR, FIELD_OFFSET(DEVMODEW, dmColor) + RTL_FIELD_SIZE(DEVMODEW, dmColor) },
77  { DM_DISPLAYFIXEDOUTPUT, FIELD_OFFSET(DEVMODEW, dmDisplayFixedOutput) + RTL_FIELD_SIZE(DEVMODEW, dmDisplayFixedOutput) },
78  { DM_DISPLAYORIENTATION, FIELD_OFFSET(DEVMODEW, dmDisplayOrientation) + RTL_FIELD_SIZE(DEVMODEW, dmDisplayOrientation) },
79  { DM_POSITION, FIELD_OFFSET(DEVMODEW, dmPosition) + RTL_FIELD_SIZE(DEVMODEW, dmPosition) },
80  { DM_PRINTQUALITY, FIELD_OFFSET(DEVMODEW, dmPrintQuality) + RTL_FIELD_SIZE(DEVMODEW, dmPrintQuality) },
81  { DM_DEFAULTSOURCE, FIELD_OFFSET(DEVMODEW, dmDefaultSource) + RTL_FIELD_SIZE(DEVMODEW, dmDefaultSource) },
82  { DM_COPIES, FIELD_OFFSET(DEVMODEW, dmCopies) + RTL_FIELD_SIZE(DEVMODEW, dmCopies) },
83  { DM_SCALE, FIELD_OFFSET(DEVMODEW, dmScale) + RTL_FIELD_SIZE(DEVMODEW, dmScale) },
84  { DM_PAPERWIDTH, FIELD_OFFSET(DEVMODEW, dmPaperWidth) + RTL_FIELD_SIZE(DEVMODEW, dmPaperWidth) },
85  { DM_PAPERLENGTH, FIELD_OFFSET(DEVMODEW, dmPaperLength) + RTL_FIELD_SIZE(DEVMODEW, dmPaperLength) },
86  { DM_PAPERSIZE, FIELD_OFFSET(DEVMODEW, dmPaperSize) + RTL_FIELD_SIZE(DEVMODEW, dmPaperSize) },
87  { DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, dmOrientation) + RTL_FIELD_SIZE(DEVMODEW, dmOrientation) },
88  { 0, 0 }
89 };
90 
94 static __inline void
96 {
97  const PBYTE pLastCharacter = &String[cbString / sizeof(BYTE) - 1];
98  PBYTE p = String;
99 
100  while (*p)
101  {
102  if (p == pLastCharacter)
103  {
104  *p = 0;
105  break;
106  }
107 
108  p++;
109  }
110 }
111 
115 static __inline void
117 {
118  const PWSTR pLastCharacter = &String[cbString / sizeof(WCHAR) - 1];
119  PWSTR p = String;
120 
121  while (*p)
122  {
123  if (p == pLastCharacter)
124  {
125  *p = 0;
126  break;
127  }
128 
129  p++;
130  }
131 }
132 
133 BOOL WINAPI
134 IsValidDevmodeA(PDEVMODEA pDevmode, size_t DevmodeSize)
135 {
137  WORD wRequiredSize;
138 
139  TRACE("IsValidDevmodeA(%p, %lu)\n", pDevmode, DevmodeSize);
140 
141  // Check if a Devmode was given at all.
142  if (!pDevmode)
143  goto Failure;
144 
145  // Verify that DevmodeSize is large enough to hold the public and private members of the structure.
146  if (DevmodeSize < pDevmode->dmSize + pDevmode->dmDriverExtra)
147  goto Failure;
148 
149  // If the structure has private members, the public structure must be 32-bit packed.
150  if (pDevmode->dmDriverExtra && pDevmode->dmSize % 4)
151  goto Failure;
152 
153  // Now determine the minimum possible dmSize based on the given fields in dmFields.
154  wRequiredSize = FIELD_OFFSET(DEVMODEA, dmFields) + RTL_FIELD_SIZE(DEVMODEA, dmFields);
155 
156  while (pTable->dwField)
157  {
158  if (pDevmode->dmFields & pTable->dwField)
159  {
160  wRequiredSize = pTable->wSize;
161  break;
162  }
163 
164  pTable++;
165  }
166 
167  // Verify that the value in dmSize is big enough for the used fields.
168  if (pDevmode->dmSize < wRequiredSize)
169  goto Failure;
170 
171  // Check if dmDeviceName and (if used) dmFormName are null-terminated.
172  // Fix this if they aren't.
173  _FixStringA(pDevmode->dmDeviceName, sizeof(pDevmode->dmDeviceName));
174  if (pDevmode->dmFields & DM_FORMNAME)
175  _FixStringA(pDevmode->dmFormName, sizeof(pDevmode->dmFormName));
176 
177  // Return success without setting the error code.
178  return TRUE;
179 
180 Failure:
182  return FALSE;
183 }
184 
185 BOOL WINAPI
186 IsValidDevmodeW(PDEVMODEW pDevmode, size_t DevmodeSize)
187 {
189  WORD wRequiredSize;
190 
191  TRACE("IsValidDevmodeW(%p, %lu)\n", pDevmode, DevmodeSize);
192 
193  // Check if a Devmode was given at all.
194  if (!pDevmode)
195  goto Failure;
196 
197  // Verify that DevmodeSize is large enough to hold the public and private members of the structure.
198  if (DevmodeSize < pDevmode->dmSize + pDevmode->dmDriverExtra)
199  goto Failure;
200 
201  // If the structure has private members, the public structure must be 32-bit packed.
202  if (pDevmode->dmDriverExtra && pDevmode->dmSize % 4)
203  goto Failure;
204 
205  // Now determine the minimum possible dmSize based on the given fields in dmFields.
206  wRequiredSize = FIELD_OFFSET(DEVMODEW, dmFields) + RTL_FIELD_SIZE(DEVMODEW, dmFields);
207 
208  while (pTable->dwField)
209  {
210  if (pDevmode->dmFields & pTable->dwField)
211  {
212  wRequiredSize = pTable->wSize;
213  break;
214  }
215 
216  pTable++;
217  }
218 
219  // Verify that the value in dmSize is big enough for the used fields.
220  if (pDevmode->dmSize < wRequiredSize)
221  goto Failure;
222 
223  // Check if dmDeviceName and (if used) dmFormName are null-terminated.
224  // Fix this if they aren't.
225  _FixStringW(pDevmode->dmDeviceName, sizeof(pDevmode->dmDeviceName));
226  if (pDevmode->dmFields & DM_FORMNAME)
227  _FixStringW(pDevmode->dmFormName, sizeof(pDevmode->dmFormName));
228 
229  // Return success without setting the error code.
230  return TRUE;
231 
232 Failure:
234  return FALSE;
235 }
236 
237 void RosConvertAnsiDevModeToUnicodeDevmode(PDEVMODEA pDevModeInput, PDEVMODEW pDevModeOutput)
238 {
239  // FIXME: This function should become ConvertAnsiDevModeToUnicodeDevmode when its parameters are known!
240 
241  // Check if a pDevModeInput and pDevModeOutput are both not NULL.
242  if (!pDevModeInput || !pDevModeOutput)
243  return;
244 
245  pDevModeOutput = GdiConvertToDevmodeW(pDevModeInput);
246 }
247 
248 // Internal counterpart to GdiConvertToDevmodeW from gdi32
249 static __inline DEVMODEA*
251 {
252  DEVMODEA *dmA;
253  WORD dmA_size, dmW_size;
254  size_t BytesToCopy;
255 
256  dmW_size = dmW->dmSize;
257 
258  /* this is the minimal dmSize that XP accepts */
259  if (dmW_size < FIELD_OFFSET(DEVMODEW, dmFields))
260  return NULL;
261 
262  // Guard against callers that set dmSize incorrectly.
263  if (dmW_size > sizeof(DEVMODEW))
264  dmW_size = sizeof(DEVMODEW);
265 
266  // dmA_size must become dmW_size without the additional 1 byte per character for each Unicode string (dmDeviceName and dmFormName).
267  dmA_size = dmW_size - CCHDEVICENAME;
268  if (dmW_size >= FIELD_OFFSET(DEVMODEW, dmFormName) + CCHFORMNAME * sizeof(WCHAR))
269  dmA_size -= CCHFORMNAME;
270 
271  // Allocate the required bytes, that is dmSize for the ANSI DEVMODEA structure plus any extra bytes requested through dmDriverExtra.
272  dmA = HeapAlloc(GetProcessHeap(), 0, dmA_size + dmW->dmDriverExtra);
273  if (!dmA) return NULL;
274 
275  // Every valid DEVMODEW has a dmDeviceName, which we convert to ANSI here.
277 
278  // Copy everything up to dmFormName or the remaining dmW_size, whatever is smaller.
279  BytesToCopy = min(FIELD_OFFSET(DEVMODEW, dmFormName) - FIELD_OFFSET(DEVMODEW, dmSpecVersion), dmW_size - CCHDEVICENAME * sizeof(WCHAR));
281 
282  // Handle dmFormName if the input DEVMODEW is large enough to contain one.
283  if (dmW_size >= FIELD_OFFSET(DEVMODEW, dmFormName) + CCHFORMNAME * sizeof(WCHAR))
284  {
285  if (dmW->dmFields & DM_FORMNAME)
287  else
288  dmA->dmFormName[0] = 0;
289 
290  // Copy the remaining fields.
291  if (dmW_size > FIELD_OFFSET(DEVMODEW, dmLogPixels))
292  memcpy(&dmA->dmLogPixels, &dmW->dmLogPixels, dmW_size - FIELD_OFFSET(DEVMODEW, dmLogPixels));
293  }
294 
295  // Append dmDriverExtra if required.
296  if (dmW->dmDriverExtra)
297  memcpy((char *)dmA + dmA_size, (const char *)dmW + dmW_size, dmW->dmDriverExtra);
298 
299  // Set the corrected dmSize and we are done.
300  dmA->dmSize = dmA_size;
301 
302  return dmA;
303 }
304 
305 void RosConvertUnicodeDevModeToAnsiDevmode(PDEVMODEW pDevModeInput, PDEVMODEA pDevModeOutput)
306 {
307  // FIXME: This function should become ConvertUnicodeDevModeToAnsiDevmode when its parameters are known!
308 
309  // Check if a pDevModeInput and pDevModeOutput are both not NULL.
310  if (!pDevModeInput || !pDevModeOutput)
311  return;
312 
313  pDevModeOutput = _ConvertToDevmodeA(pDevModeInput);
314 }
static __inline void _FixStringA(PBYTE String, DWORD cbString)
Definition: devmode.c:95
#define RTL_FIELD_SIZE(type, field)
Definition: kdb_expr.c:84
#define DM_NUP
Definition: wingdi.h:1255
#define TRUE
Definition: types.h:120
static MINIMUM_SIZE_TABLE MinimumSizeW[]
Definition: devmode.c:57
#define WideCharToMultiByte
Definition: compat.h:101
DWORD dmFields
Definition: wingdi.h:1621
WORD dmSize
Definition: wingdi.h:1567
uint16_t * PWSTR
Definition: typedefs.h:55
#define CP_ACP
Definition: compat.h:99
WORD dmDriverExtra
Definition: wingdi.h:1568
#define DM_PANNINGWIDTH
Definition: wingdi.h:1276
#define DM_DITHERTYPE
Definition: wingdi.h:1275
WORD dmDriverExtra
Definition: wingdi.h:1620
WCHAR dmFormName[CCHFORMNAME]
Definition: wingdi.h:1644
static WCHAR String[]
Definition: stringtable.c:55
char * LPSTR
Definition: xmlstorage.h:182
#define DM_COLLATE
Definition: wingdi.h:1264
BYTE dmFormName[CCHFORMNAME]
Definition: wingdi.h:1592
DEVMODEW *WINAPI GdiConvertToDevmodeW(const DEVMODEA *)
Definition: misc.c:969
#define DM_ICMINTENT
Definition: wingdi.h:1273
_In_ UINT _In_ UINT BytesToCopy
Definition: ndis.h:3167
#define DM_PELSWIDTH
Definition: wingdi.h:1268
#define DM_SCALE
Definition: wingdi.h:1253
static __inline DEVMODEA * _ConvertToDevmodeA(const DEVMODEW *dmW)
Definition: devmode.c:250
#define DM_POSITION
Definition: wingdi.h:1254
#define DM_PRINTQUALITY
Definition: wingdi.h:1259
WORD dmLogPixels
Definition: wingdi.h:1645
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DM_YRESOLUTION
Definition: wingdi.h:1262
smooth NULL
Definition: ftsmooth.c:416
#define DM_PAPERWIDTH
Definition: wingdi.h:1252
WORD dmSpecVersion
Definition: wingdi.h:1565
#define DM_FORMNAME
Definition: wingdi.h:1265
WORD dmSpecVersion
Definition: wingdi.h:1617
#define DM_PAPERLENGTH
Definition: wingdi.h:1251
void RosConvertUnicodeDevModeToAnsiDevmode(PDEVMODEW pDevModeInput, PDEVMODEA pDevModeOutput)
Definition: devmode.c:305
#define TRACE(s)
Definition: solgame.cpp:4
void RosConvertAnsiDevModeToUnicodeDevmode(PDEVMODEA pDevModeInput, PDEVMODEW pDevModeOutput)
Definition: devmode.c:237
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct _MINIMUM_SIZE_TABLE MINIMUM_SIZE_TABLE
#define DM_PAPERSIZE
Definition: wingdi.h:1250
__wchar_t WCHAR
Definition: xmlstorage.h:180
WORD dmSize
Definition: wingdi.h:1619
#define WINAPI
Definition: msvc.h:6
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
static __inline void _FixStringW(PWSTR String, DWORD cbString)
Definition: devmode.c:116
#define DM_TTOPTION
Definition: wingdi.h:1263
#define DM_DEFAULTSOURCE
Definition: wingdi.h:1258
#define SetLastError(x)
Definition: compat.h:418
WCHAR dmDeviceName[CCHDEVICENAME]
Definition: wingdi.h:1616
DWORD dmFields
Definition: wingdi.h:1569
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1271
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
#define CCHFORMNAME
Definition: wingdi.h:67
#define ERROR_INVALID_DATA
Definition: winerror.h:116
#define CCHDEVICENAME
Definition: ddrawi.h:63
#define DM_PELSHEIGHT
Definition: wingdi.h:1269
BOOL WINAPI IsValidDevmodeA(PDEVMODEA pDevmode, size_t DevmodeSize)
Definition: devmode.c:134
#define DM_ORIENTATION
Definition: wingdi.h:1249
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define DM_ICMMETHOD
Definition: wingdi.h:1272
WORD dmLogPixels
Definition: wingdi.h:1593
#define min(a, b)
Definition: monoChain.cc:55
#define DM_COPIES
Definition: wingdi.h:1257
BYTE dmDeviceName[CCHDEVICENAME]
Definition: wingdi.h:1564
#define DM_LOGPIXELS
Definition: wingdi.h:1266
static MINIMUM_SIZE_TABLE MinimumSizeA[]
Definition: devmode.c:20
static const EHCI_PERIOD pTable[]
Definition: usbehci.c:29
#define DM_BITSPERPEL
Definition: wingdi.h:1267
#define DM_COLOR
Definition: wingdi.h:1260
struct _devicemodeW DEVMODEW
#define DM_DISPLAYORIENTATION
Definition: wingdi.h:1256
GLfloat GLfloat p
Definition: glext.h:8902
#define DM_DUPLEX
Definition: wingdi.h:1261
#define DM_PANNINGHEIGHT
Definition: wingdi.h:1277
BYTE * PBYTE
Definition: pedump.c:66
BOOL WINAPI IsValidDevmodeW(PDEVMODEW pDevmode, size_t DevmodeSize)
Definition: devmode.c:186
struct _MINIMUM_SIZE_TABLE * PMINIMUM_SIZE_TABLE
#define DM_MEDIATYPE
Definition: wingdi.h:1274
#define DM_DISPLAYFLAGS
Definition: wingdi.h:1270