ReactOS  0.4.15-dev-1397-g19779b3
enable.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Framebuffer Display Driver
3  * LICENSE: Microsoft NT4 DDK Sample Code License
4  * FILE: win32ss/drivers/displays/vga_new/enable.c
5  * PURPOSE: Main Driver Initialization and PDEV Enabling
6  * PROGRAMMERS: Copyright (c) 1992-1995 Microsoft Corporation
7  * ReactOS Portable Systems Group
8  */
9 
10 #include "driver.h"
11 
12 // The driver function table with all function index/address pairs
13 
14 static DRVFN gadrvfn[] =
15 {
22 // eVb: 1.2 [VGARISC Change] - Disable hardware palette support
24 // eVb: 1.2 [END]
25 // eVb: 1.1 [VGARISC Change] - Disable hardware pointer support
26 #if 0
29 #endif
30 // eVb: 1.1 [END]
32 };
33 
34 // Define the functions you want to hook for 8/16/24/32 pel formats
35 
36 #define HOOKS_BMF8BPP 0
37 
38 #define HOOKS_BMF16BPP 0
39 
40 #define HOOKS_BMF24BPP 0
41 
42 #define HOOKS_BMF32BPP 0
43 
44 /******************************Public*Routine******************************\
45 * DrvEnableDriver
46 *
47 * Enables the driver by retrieving the drivers function table and version.
48 *
49 \**************************************************************************/
50 
52 ULONG iEngineVersion,
53 ULONG cj,
54 PDRVENABLEDATA pded)
55 {
56 // Engine Version is passed down so future drivers can support previous
57 // engine versions. A next generation driver can support both the old
58 // and new engine conventions if told what version of engine it is
59 // working with. For the first version the driver does nothing with it.
60 // eVb: 1.1 [DDK Change] - Remove bogus statement
61  //iEngineVersion;
62 // eVb: 1.1 [END]
63 // Fill in as much as we can.
64 
65  if (cj >= sizeof(DRVENABLEDATA))
66  pded->pdrvfn = gadrvfn;
67 
68  if (cj >= (sizeof(ULONG) * 2))
69  pded->c = sizeof(gadrvfn) / sizeof(DRVFN);
70 
71 // DDI version this driver was targeted for is passed back to engine.
72 // Future graphic's engine may break calls down to old driver format.
73 
74  if (cj >= sizeof(ULONG))
75 // eVb: 1.2 [DDK Change] - Use DDI_DRIVER_VERSION_NT4 instead of DDI_DRIVER_VERSION
77 // eVb: 1.2 [END]
78 
79  return(TRUE);
80 }
81 
82 /******************************Public*Routine******************************\
83 * DrvEnablePDEV
84 *
85 * DDI function, Enables the Physical Device.
86 *
87 * Return Value: device handle to pdev.
88 *
89 \**************************************************************************/
90 
92 DEVMODEW *pDevmode, // Pointer to DEVMODE
93 PWSTR pwszLogAddress, // Logical address
94 ULONG cPatterns, // number of patterns
95 HSURF *ahsurfPatterns, // return standard patterns
96 ULONG cjGdiInfo, // Length of memory pointed to by pGdiInfo
97 ULONG *pGdiInfo, // Pointer to GdiInfo structure
98 ULONG cjDevInfo, // Length of following PDEVINFO structure
99 DEVINFO *pDevInfo, // physical device information structure
100 HDEV hdev, // HDEV, used for callbacks
101 PWSTR pwszDeviceName, // DeviceName - not used
102 HANDLE hDriver) // Handle to base driver
103 {
104  GDIINFO GdiInfo;
105  DEVINFO DevInfo;
106  PPDEV ppdev = (PPDEV) NULL;
107 
110 
111  // Allocate a physical device structure.
112 
113  ppdev = (PPDEV) EngAllocMem(0, sizeof(PDEV), ALLOC_TAG);
114 
115  if (ppdev == (PPDEV) NULL)
116  {
117  RIP("DISP DrvEnablePDEV failed EngAllocMem\n");
118  return((DHPDEV) 0);
119  }
120 
121  memset(ppdev, 0, sizeof(PDEV));
122 
123  // Save the screen handle in the PDEV.
124 
125  ppdev->hDriver = hDriver;
126 
127  // Get the current screen mode information. Set up device caps and devinfo.
128 
129  if (!bInitPDEV(ppdev, pDevmode, &GdiInfo, &DevInfo))
130  {
131  DISPDBG((0,"DISP DrvEnablePDEV failed\n"));
132  goto error_free;
133  }
134 
135 // eVb: 1.2 [VGARISC Change] - Disable hardware pointer support
136 #if 0
137  // Initialize the cursor information.
138 
139  if (!bInitPointer(ppdev, &DevInfo))
140  {
141  // Not a fatal error...
142  DISPDBG((0, "DrvEnablePDEV failed bInitPointer\n"));
143  }
144 
145 #endif
146 // eVb: 1.2 [END]
147  // Initialize palette information.
148 
149  if (!bInitPaletteInfo(ppdev, &DevInfo))
150  {
151  RIP("DrvEnablePDEV failed bInitPalette\n");
152  goto error_free;
153  }
154 
155  // Copy the devinfo into the engine buffer.
156 
157  memcpy(pDevInfo, &DevInfo, min(sizeof(DEVINFO), cjDevInfo));
158 
159  // Set the pdevCaps with GdiInfo we have prepared to the list of caps for this
160  // pdev.
161 
162  memcpy(pGdiInfo, &GdiInfo, min(cjGdiInfo, sizeof(GDIINFO)));
163 
164  return((DHPDEV) ppdev);
165 
166  // Error case for failure.
167 error_free:
168  EngFreeMem(ppdev);
169  return((DHPDEV) 0);
170 }
171 
172 /******************************Public*Routine******************************\
173 * DrvCompletePDEV
174 *
175 * Store the HPDEV, the engines handle for this PDEV, in the DHPDEV.
176 *
177 \**************************************************************************/
178 
180 DHPDEV dhpdev,
181 HDEV hdev)
182 {
183  ((PPDEV) dhpdev)->hdevEng = hdev;
184 }
185 
186 /******************************Public*Routine******************************\
187 * DrvDisablePDEV
188 *
189 * Release the resources allocated in DrvEnablePDEV. If a surface has been
190 * enabled DrvDisableSurface will have already been called.
191 *
192 \**************************************************************************/
193 
195 DHPDEV dhpdev)
196 {
197  vDisablePalette((PPDEV) dhpdev);
198  EngFreeMem(dhpdev);
199 }
200 
201 /******************************Public*Routine******************************\
202 * DrvEnableSurface
203 *
204 * Enable the surface for the device. Hook the calls this driver supports.
205 *
206 * Return: Handle to the surface if successful, 0 for failure.
207 *
208 \**************************************************************************/
209 
211 DHPDEV dhpdev)
212 {
213  PPDEV ppdev;
214  HSURF hsurf;
215  SIZEL sizl;
216  ULONG ulBitmapType;
217 #if 0
218  FLONG flHooks;
219 #endif
220  HSURF hSurfBitmap;
221 
222  // Create engine bitmap around frame buffer.
223 
224  ppdev = (PPDEV) dhpdev;
225 
226  if (!bInitSURF(ppdev, TRUE))
227  {
228  RIP("DISP DrvEnableSurface failed bInitSURF\n");
229  return(FALSE);
230  }
231 
232  sizl.cx = ppdev->cxScreen;
233  sizl.cy = ppdev->cyScreen;
234 
235 // eVb: 1.3 [VGARISC Change] - Disable dynamic palette and > 4BPP support
236 #if 0
237  if (ppdev->ulBitCount == 8)
238  {
239  if (!bInit256ColorPalette(ppdev)) {
240  RIP("DISP DrvEnableSurface failed to init the 8bpp palette\n");
241  return(FALSE);
242  }
243  ulBitmapType = BMF_8BPP;
244  flHooks = HOOKS_BMF8BPP;
245  }
246  else if (ppdev->ulBitCount == 16)
247  {
248  ulBitmapType = BMF_16BPP;
249  flHooks = HOOKS_BMF16BPP;
250  }
251  else if (ppdev->ulBitCount == 24)
252  {
253  ulBitmapType = BMF_24BPP;
254  flHooks = HOOKS_BMF24BPP;
255  }
256  else
257  {
258  ulBitmapType = BMF_32BPP;
259  flHooks = HOOKS_BMF32BPP;
260  }
261 // eVb: 1.3 [DDK Change] - Support new VGA Miniport behavior w.r.t updated framebuffer remapping
262  ppdev->flHooks = flHooks;
263 // eVb: 1.3 [END]
264 #else
265  ulBitmapType = BMF_4BPP;
266 #endif
267 // eVb: 1.3 [END]
268 // eVb: 1.4 [DDK Change] - Use EngCreateDeviceSurface instead of EngCreateBitmap
269  hsurf = (HSURF)EngCreateDeviceSurface((DHSURF)ppdev,
270  sizl,
271  ulBitmapType);
272 
273  if (hsurf == (HSURF) 0)
274  {
275  RIP("DISP DrvEnableSurface failed EngCreateDeviceSurface\n");
276  return(FALSE);
277  }
278 // eVb: 1.4 [END]
279 
280 // eVb: 1.5 [DDK Change] - Use EngModifySurface instead of EngAssociateSurface
281  if ( !EngModifySurface(hsurf,
282  ppdev->hdevEng,
283  ppdev->flHooks | HOOK_SYNCHRONIZE,
285  (DHSURF)ppdev,
286  ppdev->pjScreen,
287  ppdev->lDeltaScreen,
288  NULL))
289  {
290  RIP("DISP DrvEnableSurface failed EngModifySurface\n");
291  return(FALSE);
292  }
293 // eVb: 1.5 [END]
294  ppdev->hsurfEng = hsurf;
295 // eVb: 1.4 [VGARISC Change] - Allocate 4BPP DIB that will store GDI drawing
296  hSurfBitmap = (HSURF)EngCreateBitmap(sizl, 0, ulBitmapType, 0, NULL);
297  if (hSurfBitmap == (HSURF) 0)
298  {
299  RIP("DISP DrvEnableSurface failed EngCreateBitmap\n");
300  return(FALSE);
301  }
302 
303  if ( !EngModifySurface(hSurfBitmap,
304  ppdev->hdevEng,
305  ppdev->flHooks | HOOK_SYNCHRONIZE,
307  (DHSURF)ppdev,
308  ppdev->pjScreen,
309  ppdev->lDeltaScreen,
310  NULL))
311  {
312  RIP("DISP DrvEnableSurface failed second EngModifySurface\n");
313  return(FALSE);
314  }
315 
316  ppdev->pso = EngLockSurface(hSurfBitmap);
317  if (ppdev->pso == NULL)
318  {
319  RIP("DISP DrvEnableSurface failed EngLockSurface\n");
320  return(FALSE);
321  }
322 // eVb: 1.4 [END]
323  return(hsurf);
324 }
325 
326 /******************************Public*Routine******************************\
327 * DrvDisableSurface
328 *
329 * Free resources allocated by DrvEnableSurface. Release the surface.
330 *
331 \**************************************************************************/
332 
334 DHPDEV dhpdev)
335 {
336  EngDeleteSurface(((PPDEV) dhpdev)->hsurfEng);
337  vDisableSURF((PPDEV) dhpdev);
338  ((PPDEV) dhpdev)->hsurfEng = (HSURF) 0;
339 }
340 
341 /******************************Public*Routine******************************\
342 * DrvAssertMode
343 *
344 * This asks the device to reset itself to the mode of the pdev passed in.
345 *
346 \**************************************************************************/
347 
349 DHPDEV dhpdev,
350 BOOL bEnable)
351 {
352  PPDEV ppdev = (PPDEV) dhpdev;
353  ULONG ulReturn;
354  PBYTE pjScreen;
355 
356  if (bEnable)
357  {
358  //
359  // The screen must be reenabled, reinitialize the device to clean state.
360  //
361 // eVb: 1.6 [DDK Change] - Support new VGA Miniport behavior w.r.t updated framebuffer remapping
362  pjScreen = ppdev->pjScreen;
363 
364  if (!bInitSURF(ppdev, FALSE))
365  {
366  DISPDBG((0, "DISP DrvAssertMode failed bInitSURF\n"));
367  return (FALSE);
368  }
369 
370  if (pjScreen != ppdev->pjScreen) {
371 
372  if ( !EngModifySurface(ppdev->hsurfEng,
373  ppdev->hdevEng,
374  ppdev->flHooks | HOOK_SYNCHRONIZE,
376  (DHSURF)ppdev,
377  ppdev->pjScreen,
378  ppdev->lDeltaScreen,
379  NULL))
380  {
381  DISPDBG((0, "DISP DrvAssertMode failed EngModifySurface\n"));
382  return (FALSE);
383  }
384  }
385 // eVb: 1.6 [END]
386  return (TRUE);
387  }
388  else
389  {
390  //
391  // We must give up the display.
392  // Call the kernel driver to reset the device to a known state.
393  //
394 
395  if (EngDeviceIoControl(ppdev->hDriver,
397  NULL,
398  0,
399  NULL,
400  0,
401  &ulReturn))
402  {
403  RIP("DISP DrvAssertMode failed IOCTL");
404  return FALSE;
405  }
406  else
407  {
408  return TRUE;
409  }
410  }
411 }
412 
413 /******************************Public*Routine******************************\
414 * DrvGetModes
415 *
416 * Returns the list of available modes for the device.
417 *
418 \**************************************************************************/
419 
422 ULONG cjSize,
423 DEVMODEW *pdm)
424 
425 {
426 
427  DWORD cModes;
428  DWORD cbOutputSize;
429  PVIDEO_MODE_INFORMATION pVideoModeInformation, pVideoTemp;
430  DWORD cOutputModes = cjSize / (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
431  DWORD cbModeSize;
432 
433  DISPDBG((3, "DrvGetModes\n"));
434 
435  cModes = getAvailableModes(hDriver,
436  (PVIDEO_MODE_INFORMATION *) &pVideoModeInformation,
437  &cbModeSize);
438 
439  if (cModes == 0)
440  {
441  DISPDBG((0, "DrvGetModes failed to get mode information"));
442  return 0;
443  }
444 
445  if (pdm == NULL)
446  {
447  cbOutputSize = cModes * (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
448  }
449  else
450  {
451  //
452  // Now copy the information for the supported modes back into the output
453  // buffer
454  //
455 
456  cbOutputSize = 0;
457 
458  pVideoTemp = pVideoModeInformation;
459 
460  do
461  {
462  if (pVideoTemp->Length != 0)
463  {
464  if (cOutputModes == 0)
465  {
466  break;
467  }
468 
469  //
470  // Zero the entire structure to start off with.
471  //
472 
473  memset(pdm, 0, sizeof(DEVMODEW));
474 
475  //
476  // Set the name of the device to the name of the DLL.
477  //
478 
479  memcpy(pdm->dmDeviceName, DLL_NAME, sizeof(DLL_NAME));
480 
483  pdm->dmSize = sizeof(DEVMODEW);
485 
486  pdm->dmBitsPerPel = pVideoTemp->NumberOfPlanes *
487  pVideoTemp->BitsPerPlane;
488  pdm->dmPelsWidth = pVideoTemp->VisScreenWidth;
489  pdm->dmPelsHeight = pVideoTemp->VisScreenHeight;
490  pdm->dmDisplayFrequency = pVideoTemp->Frequency;
491  pdm->dmDisplayFlags = 0;
492 
493  pdm->dmFields = DM_BITSPERPEL |
494  DM_PELSWIDTH |
495  DM_PELSHEIGHT |
498 
499  //
500  // Go to the next DEVMODE entry in the buffer.
501  //
502 
503  cOutputModes--;
504 
505  pdm = (LPDEVMODEW) ( ((ULONG)pdm) + sizeof(DEVMODEW) +
507 
508  cbOutputSize += (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
509 
510  }
511 
512  pVideoTemp = (PVIDEO_MODE_INFORMATION)
513  (((PUCHAR)pVideoTemp) + cbModeSize);
514 
515  } while (--cModes);
516  }
517 
518  EngFreeMem(pVideoModeInformation);
519 
520  return cbOutputSize;
521 
522 }
#define BMF_24BPP
Definition: winddi.h:359
HSURF hsurfEng
Definition: driver.h:26
_In_ ULONG cj
Definition: winddi.h:3540
struct _devicemodeW * LPDEVMODEW
#define INDEX_DrvCompletePDEV
Definition: winddi.h:417
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
#define BMF_32BPP
Definition: winddi.h:360
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:564
ULONG NTAPI DrvGetModes(HANDLE hDriver, ULONG cjSize, DEVMODEW *pdm)
Definition: enable.c:374
DWORD dmFields
Definition: wingdi.h:1621
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define DRIVER_EXTRA_SIZE
Definition: driver.h:71
#define INDEX_DrvGetModes
Definition: winddi.h:457
#define EngFreeMem
Definition: polytest.cpp:56
uint16_t * PWSTR
Definition: typedefs.h:56
unsigned char * PUCHAR
Definition: retypes.h:3
HSURF NTAPI DrvEnableSurface(DHPDEV dhpdev)
Definition: enable.c:200
#define INDEX_DrvEnablePDEV
Definition: winddi.h:416
Definition: xlate.c:9
BOOL NTAPI DrvAssertMode(DHPDEV dhpdev, BOOL bEnable)
Definition: enable.c:302
#define DLL_NAME
Definition: driver.h:73
VOID APIENTRY DrvDisablePDEV(IN DHPDEV dhpdev)
Definition: enable.c:150
WORD dmDriverExtra
Definition: wingdi.h:1620
#define RIP(x)
Definition: debug.h:24
VOID NTAPI vDisablePalette(PPDEV)
Definition: palette.c:65
ENGAPI BOOL APIENTRY EngModifySurface(_In_ HSURF hsurf, _In_ HDEV hdev, _In_ FLONG flHooks, _In_ FLONG flSurface, _In_ DHSURF dhsurf, _In_ PVOID pvScan0, _In_ LONG lDelta, _Reserved_ PVOID pvReserved)
Definition: surface.c:468
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3553
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
DWORD dmBitsPerPel
Definition: wingdi.h:1646
_In_ SIZEL sizl
Definition: winddi.h:3467
#define DM_PELSWIDTH
Definition: wingdi.h:1268
#define ALLOC_TAG
Definition: btrfs_drv.h:91
ULONG cyScreen
Definition: driver.h:30
struct _VIDEO_MODE_INFORMATION * PVIDEO_MODE_INFORMATION
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE hDriver
Definition: framebuf.h:35
BOOL NTAPI bInitPaletteInfo(PPDEV, DEVINFO *)
Definition: palette.c:50
#define INDEX_DrvAssertMode
Definition: winddi.h:421
static DRVFN gadrvfn[]
Definition: enable.c:14
unsigned long FLONG
Definition: ntbasedef.h:367
#define BMF_16BPP
Definition: winddi.h:358
BOOL APIENTRY DrvEnableDriver(ULONG iEngineVersion, ULONG cj, PDRVENABLEDATA pded)
Definition: enable.c:50
WORD dmSpecVersion
Definition: wingdi.h:1617
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
#define DDI_DRIVER_VERSION_NT4
Definition: winddi.h:535
HDEV hdevEng
Definition: driver.h:25
ULONG ulBitCount
Definition: driver.h:42
#define HOOKS_BMF8BPP
Definition: enable.c:36
WORD dmSize
Definition: wingdi.h:1619
unsigned long DWORD
Definition: ntddk_ex.h:95
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
Definition: surface.c:604
Definition: xlate.c:10
DRVFN * pdrvfn
Definition: winddi.h:544
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
WCHAR dmDeviceName[CCHDEVICENAME]
Definition: wingdi.h:1616
DWORD dmPelsWidth
Definition: wingdi.h:1647
#define DISPDBG(arg)
Definition: debug.h:23
#define MS_NOTSYSTEMMEMORY
Definition: winddi.h:2129
FN_DrvSetPalette DrvSetPalette
#define HOOK_SYNCHRONIZE
Definition: winddi.h:1431
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
LONG flHooks
Definition: driver.h:51
struct _PDEV * PPDEV
VOID NTAPI vDisableSURF(PPDEV)
Definition: screen.c:172
#define INDEX_DrvSetPointerShape
Definition: winddi.h:445
Definition: framebuf.h:33
#define DM_SPECVERSION
Definition: wingdi.h:1242
DWORD NTAPI getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *)
Definition: screen.c:507
#define INDEX_DrvSetPalette
Definition: winddi.h:438
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1271
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define INDEX_DrvDisableSurface
Definition: winddi.h:420
FN_DrvMovePointer DrvMovePointer
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
DHPDEV APIENTRY DrvEnablePDEV(IN DEVMODEW *pdm, IN LPWSTR pwszLogAddress, IN ULONG cPat, OUT HSURF *phsurfPatterns, IN ULONG cjCaps, OUT ULONG *pdevcaps, IN ULONG cjDevInfo, OUT DEVINFO *pdi, IN HDEV hdev, IN LPWSTR pwszDeviceName, IN HANDLE hDriver)
Definition: enable.c:78
#define INDEX_DrvEnableSurface
Definition: winddi.h:419
DWORD dmDisplayFrequency
Definition: wingdi.h:1653
FN_DrvSetPointerShape DrvSetPointerShape
BOOLEAN(* PFN)(PARGS)
Definition: parse.h:47
_In_ BOOL bEnable
Definition: winddi.h:3426
VOID APIENTRY DrvCompletePDEV(IN DHPDEV dhpdev, IN HDEV hdev)
Definition: enable.c:132
PBYTE pjScreen
Definition: driver.h:28
BOOL NTAPI bInit256ColorPalette(PPDEV)
Definition: palette.c:193
#define DM_PELSHEIGHT
Definition: wingdi.h:1269
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG cjDevInfo
Definition: winddi.h:3553
ULONG iDriverVersion
Definition: winddi.h:542
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
#define HOOKS_BMF16BPP
Definition: enable.c:38
#define INDEX_DrvDisablePDEV
Definition: winddi.h:418
#define INDEX_DrvMovePointer
Definition: winddi.h:446
DWORD dmPelsHeight
Definition: wingdi.h:1648
_Must_inspect_result_ ENGAPI HSURF APIENTRY EngCreateDeviceSurface(_In_ DHSURF dhsurf, _In_ SIZEL sizl, _In_ ULONG iFormatCompat)
Definition: surface.c:388
unsigned int ULONG
Definition: retypes.h:1
BOOL NTAPI bInitPointer(PPDEV, DEVINFO *)
Definition: pointer.c:400
_In_ ULONG cjSize
Definition: winddi.h:3634
BOOL NTAPI bInitSURF(PPDEV, BOOL)
Definition: screen.c:43
BOOL NTAPI bInitPDEV(PPDEV, PDEVMODEW, GDIINFO *, DEVINFO *)
#define DM_BITSPERPEL
Definition: wingdi.h:1267
struct _devicemodeW DEVMODEW
WORD dmDriverVersion
Definition: wingdi.h:1618
DWORD dmDisplayFlags
Definition: wingdi.h:1650
#define HOOKS_BMF24BPP
Definition: enable.c:40
#define memset(x, y, z)
Definition: compat.h:39
VOID NTAPI DrvDisableSurface(DHPDEV dhpdev)
Definition: enable.c:287
BYTE * PBYTE
Definition: pedump.c:66
Definition: winddi.h:529
ULONG cxScreen
Definition: driver.h:29
_In_ HDEV hdev
Definition: winddi.h:3449
#define DM_DISPLAYFLAGS
Definition: wingdi.h:1270
#define APIENTRY
Definition: api.h:79
ENGAPI HBITMAP APIENTRY EngCreateBitmap(_In_ SIZEL sizl, _In_ LONG lWidth, _In_ ULONG iFormat, _In_ FLONG fl, _In_opt_ PVOID pvBits)
#define HOOKS_BMF32BPP
Definition: enable.c:42