ReactOS  0.4.15-dev-4616-g17e0e44
pdevobj.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * PURPOSE: Support for physical devices
5  * FILE: win32ss/gdi/eng/pdevobj.c
6  * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7  */
8 
9 #include <win32k.h>
10 #define NDEBUG
11 #include <debug.h>
12 DBG_DEFAULT_CHANNEL(EngPDev);
13 
16 
17 BOOL
20  _In_ ULONG iEngineVersion,
21  _In_ ULONG cj,
23 
24 extern DRVFN gPanDispDrvFn[];
25 extern ULONG gPanDispDrvCount;
26 
27 CODE_SEG("INIT")
29 NTAPI
31 {
34  return STATUS_SUCCESS;
35 }
36 
37 #if DBG
39 NTAPI
40 DbgLookupDHPDEV(DHPDEV dhpdev)
41 {
42  PPDEVOBJ ppdev;
43 
44  /* Lock PDEV list */
45  EngAcquireSemaphoreShared(ghsemPDEV);
46 
47  /* Walk through the list of PDEVs */
48  for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
49  {
50  /* Compare with the given DHPDEV */
51  if (ppdev->dhpdev == dhpdev) break;
52  }
53 
54  /* Unlock PDEV list */
56 
57  return ppdev;
58 }
59 #endif
60 
63 {
64  PPDEVOBJ ppdev;
65 
67  if (!ppdev)
68  return NULL;
69 
70  RtlZeroMemory(ppdev, sizeof(PDEVOBJ));
71 
73  if (ppdev->hsemDevLock == NULL)
74  {
76  return NULL;
77  }
78 
79  /* Allocate EDD_DIRECTDRAW_GLOBAL for our ReactX driver */
81  if (ppdev->pEDDgpl)
83 
84  ppdev->cPdevRefs = 1;
85 
86  return ppdev;
87 }
88 
89 static
90 VOID
92  PPDEVOBJ ppdev)
93 {
95  if (ppdev->pdmwDev)
97  if (ppdev->pEDDgpl)
100 }
101 
102 VOID
103 NTAPI
105  _Inout_ PPDEVOBJ ppdev)
106 {
107  /* Lock loader */
109 
110  /* Decrease reference count */
111  InterlockedDecrement(&ppdev->cPdevRefs);
112  ASSERT(ppdev->cPdevRefs >= 0);
113 
114  /* Check if references are left */
115  if (ppdev->cPdevRefs == 0)
116  {
117  /* Do we have a surface? */
118  if (ppdev->pSurface)
119  {
120  /* Release the surface and let the driver free it */
121  SURFACE_ShareUnlockSurface(ppdev->pSurface);
122  TRACE("DrvDisableSurface(dhpdev %p)\n", ppdev->dhpdev);
123  ppdev->pfn.DisableSurface(ppdev->dhpdev);
124  }
125 
126  /* Do we have a palette? */
127  if (ppdev->ppalSurf)
128  {
129  PALETTE_ShareUnlockPalette(ppdev->ppalSurf);
130  }
131 
132  /* Check if the PDEV was enabled */
133  if (ppdev->dhpdev != NULL)
134  {
135  /* Disable the PDEV */
136  TRACE("DrvDisablePDEV(dhpdev %p)\n", ppdev->dhpdev);
137  ppdev->pfn.DisablePDEV(ppdev->dhpdev);
138  }
139 
140  /* Remove it from list */
141  if (ppdev == gppdevList)
142  {
143  gppdevList = ppdev->ppdevNext;
144  }
145  else if (gppdevList)
146  {
147  PPDEVOBJ ppdevCurrent = gppdevList;
148  BOOL found = FALSE;
149  while (!found && ppdevCurrent->ppdevNext)
150  {
151  if (ppdevCurrent->ppdevNext == ppdev)
152  found = TRUE;
153  else
154  ppdevCurrent = ppdevCurrent->ppdevNext;
155  }
156  if (found)
157  ppdevCurrent->ppdevNext = ppdev->ppdevNext;
158  }
159 
160  /* Unload display driver */
161  EngUnloadImage(ppdev->pldev);
162 
163  /* Free it */
164  PDEVOBJ_vDeletePDEV(ppdev);
165  }
166 
167  /* Unlock loader */
169 }
170 
171 BOOL
172 NTAPI
174  _In_ PPDEVOBJ ppdev,
175  _In_ PDEVMODEW pdevmode,
177 {
178  PFN_DrvEnablePDEV pfnEnablePDEV;
179  ULONG i;
180 
181  /* Get the DrvEnablePDEV function */
182  pfnEnablePDEV = ppdev->pfn.EnablePDEV;
183 
184  /* Call the drivers DrvEnablePDEV function */
185  TRACE("DrvEnablePDEV(pdevmode %p (%dx%dx%d %d Hz) hdev %p (%S))\n",
186  pdevmode,
187  ppdev->pGraphicsDevice ? pdevmode->dmPelsWidth : 0,
188  ppdev->pGraphicsDevice ? pdevmode->dmPelsHeight : 0,
189  ppdev->pGraphicsDevice ? pdevmode->dmBitsPerPel : 0,
190  ppdev->pGraphicsDevice ? pdevmode->dmDisplayFrequency : 0,
191  ppdev,
192  ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->szNtDeviceName : L"");
193  ppdev->dhpdev = pfnEnablePDEV(pdevmode,
195  HS_DDI_MAX,
196  ppdev->ahsurf,
197  sizeof(GDIINFO),
198  (PULONG)&ppdev->gdiinfo,
199  sizeof(DEVINFO),
200  &ppdev->devinfo,
201  (HDEV)ppdev,
202  ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->pwszDescription : NULL,
203  ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->DeviceObject : NULL);
204  TRACE("DrvEnablePDEV(pdevmode %p hdev %p) => dhpdev %p\n", pdevmode, ppdev, ppdev->dhpdev);
205  if (ppdev->dhpdev == NULL)
206  {
207  ERR("Failed to enable PDEV\n");
208  return FALSE;
209  }
210 
211  /* Fix up some values */
212  if (ppdev->gdiinfo.ulLogPixelsX == 0)
213  ppdev->gdiinfo.ulLogPixelsX = 96;
214 
215  if (ppdev->gdiinfo.ulLogPixelsY == 0)
216  ppdev->gdiinfo.ulLogPixelsY = 96;
217 
218  /* Set raster caps */
219  ppdev->gdiinfo.flRaster = RC_OP_DX_OUTPUT | RC_GDI20_OUTPUT | RC_BIGFONT;
220  if ((ppdev->gdiinfo.ulTechnology != DT_PLOTTER) && (ppdev->gdiinfo.ulTechnology != DT_CHARSTREAM))
221  ppdev->gdiinfo.flRaster |= RC_STRETCHDIB | RC_STRETCHBLT | RC_DIBTODEV | RC_DI_BITMAP | RC_BITMAP64 | RC_BITBLT;
222  if (ppdev->gdiinfo.ulTechnology == DT_RASDISPLAY)
223  ppdev->gdiinfo.flRaster |= RC_FLOODFILL;
224  if (ppdev->devinfo.flGraphicsCaps & GCAPS_PALMANAGED)
225  ppdev->gdiinfo.flRaster |= RC_PALETTE;
226 
227  /* Setup Palette */
228  ppdev->ppalSurf = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
229 
230  /* Setup hatch brushes */
231  for (i = 0; i < HS_DDI_MAX; i++)
232  {
233  if (ppdev->ahsurf[i] == NULL)
234  ppdev->ahsurf[i] = gahsurfHatch[i];
235  }
236 
237  TRACE("PDEVOBJ_bEnablePDEV - dhpdev = %p\n", ppdev->dhpdev);
238 
239  return TRUE;
240 }
241 
242 VOID
243 NTAPI
245  PPDEVOBJ ppdev)
246 {
247  /* Call the drivers DrvCompletePDEV function */
248  TRACE("DrvCompletePDEV(dhpdev %p hdev %p)\n", ppdev->dhpdev, ppdev);
249  ppdev->pfn.CompletePDEV(ppdev->dhpdev, (HDEV)ppdev);
250 }
251 
252 static
253 VOID
255  _In_ PPDEVOBJ ppdev)
256 {
257  PLDEVOBJ pldev = ppdev->pldev;
258  ULONG dwAccelerationLevel = ppdev->dwAccelerationLevel;
259 
260  if (!pldev->pGdiDriverInfo)
261  return;
262  if (pldev->ldevtype != LDEV_DEVICE_DISPLAY)
263  return;
264 
265  if (dwAccelerationLevel >= 1)
266  {
268  ppdev->apfn[INDEX_DrvCreateDeviceBitmap] = NULL;
269  }
270 
271  if (dwAccelerationLevel >= 2)
272  {
273  /* Remove sophisticated display accelerations */
274  ppdev->pSurface->flags &= ~(HOOK_STRETCHBLT |
275  HOOK_FILLPATH |
277  HOOK_LINETO |
280  }
281 
282  if (dwAccelerationLevel >= 3)
283  {
284  /* Disable DirectDraw and Direct3D accelerations */
285  /* FIXME: need to call DxDdSetAccelLevel */
287  }
288 
289  if (dwAccelerationLevel >= 4)
290  {
291  /* Remove almost all display accelerations */
292  ppdev->pSurface->flags &= ~HOOK_FLAGS |
293  HOOK_BITBLT |
294  HOOK_COPYBITS |
295  HOOK_TEXTOUT |
298 
299  }
300 
301  if (dwAccelerationLevel >= 5)
302  {
303  /* Disable all display accelerations */
304  /* (nothing to do. Already handled in PDEVOBJ_Create) */
305  }
306 }
307 
308 PSURFACE
309 NTAPI
311  PPDEVOBJ ppdev)
312 {
313  HSURF hsurf;
314 
315  /* Check if there is no surface for this PDEV yet */
316  if (ppdev->pSurface == NULL)
317  {
318  /* Call the drivers DrvEnableSurface */
319  TRACE("DrvEnableSurface(dhpdev %p)\n", ppdev->dhpdev);
320  hsurf = ppdev->pfn.EnableSurface(ppdev->dhpdev);
321  TRACE("DrvEnableSurface(dhpdev %p) => hsurf %p\n", ppdev->dhpdev, hsurf);
322  if (hsurf== NULL)
323  {
324  ERR("Failed to create PDEV surface!\n");
325  return NULL;
326  }
327 
328  /* Get a reference to the surface */
329  ppdev->pSurface = SURFACE_ShareLockSurface(hsurf);
330  NT_ASSERT(ppdev->pSurface != NULL);
331  }
332 
333  /* Increment reference count */
335 
336  return ppdev->pSurface;
337 }
338 
339 VOID
341  _Inout_ PPDEVOBJ ppdev)
342 {
343  BOOL assertVal;
344 
345  if (!(ppdev->flFlags & PDEV_DISABLED))
346  return;
347 
348  /* Try to enable display until success */
349  do
350  {
351  TRACE("DrvAssertMode(dhpdev %p, TRUE)\n", ppdev->dhpdev);
352  assertVal = ppdev->pfn.AssertMode(ppdev->dhpdev, TRUE);
353  TRACE("DrvAssertMode(dhpdev %p, TRUE) => %d\n", ppdev->dhpdev, assertVal);
354  } while (!assertVal);
355 
356  ppdev->flFlags &= ~PDEV_DISABLED;
357 }
358 
359 BOOL
361  _Inout_ PPDEVOBJ ppdev)
362 {
363  BOOL assertVal;
364 
365  if (ppdev->flFlags & PDEV_DISABLED)
366  return TRUE;
367 
368  TRACE("DrvAssertMode(dhpdev %p, FALSE)\n", ppdev->dhpdev);
369  assertVal = ppdev->pfn.AssertMode(ppdev->dhpdev, FALSE);
370  TRACE("DrvAssertMode(dhpdev %p, FALSE) => %d\n", ppdev->dhpdev, assertVal);
371 
372  if (assertVal)
373  ppdev->flFlags |= PDEV_DISABLED;
374 
375  return assertVal;
376 }
377 
378 VOID
379 NTAPI
381  PPDEVOBJ ppdev)
382 {
383  PGRAPHICS_DEVICE pGraphicsDevice;
384  PDEVMODEINFO pdminfo, pdmiNext;
385 
386  /* Lock the PDEV */
388 
389  pGraphicsDevice = ppdev->pGraphicsDevice;
390 
391  /* Clear out the modes */
392  for (pdminfo = pGraphicsDevice->pdevmodeInfo;
393  pdminfo;
394  pdminfo = pdmiNext)
395  {
396  pdmiNext = pdminfo->pdmiNext;
398  }
399  pGraphicsDevice->pdevmodeInfo = NULL;
400  ExFreePoolWithTag(pGraphicsDevice->pDevModeList, GDITAG_GDEVICE);
401  pGraphicsDevice->pDevModeList = NULL;
402 
403  /* Update available display mode list */
404  LDEVOBJ_bBuildDevmodeList(pGraphicsDevice);
405 
406  /* Unlock PDEV */
408 }
409 
410 PPDEVOBJ
412  _In_opt_ PGRAPHICS_DEVICE pGraphicsDevice,
413  _In_opt_ PDEVMODEW pdm,
414  _In_ ULONG dwAccelerationLevel,
415  _In_ ULONG ldevtype)
416 {
417  PPDEVOBJ ppdev, ppdevMatch = NULL;
418  PLDEVOBJ pldev;
420 
421  TRACE("PDEVOBJ_Create(%p %p %d)\n", pGraphicsDevice, pdm, ldevtype);
422 
423  if (ldevtype != LDEV_DEVICE_META)
424  {
425  ASSERT(pGraphicsDevice);
426  ASSERT(pdm);
427  /* Search if we already have a PPDEV with the required characteristics.
428  * We will compare the graphics device, the devmode and the desktop
429  */
430  for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
431  {
432  if (ppdev->pGraphicsDevice == pGraphicsDevice)
433  {
434  PDEVOBJ_vReference(ppdev);
435 
436  if (RtlEqualMemory(pdm, ppdev->pdmwDev, sizeof(DEVMODEW)) &&
437  ppdev->dwAccelerationLevel == dwAccelerationLevel)
438  {
439  PDEVOBJ_vReference(ppdev);
440  ppdevMatch = ppdev;
441  }
442  else
443  {
445  }
446 
447  PDEVOBJ_vRelease(ppdev);
448  }
449  }
450 
451  if (ppdevMatch)
452  {
453  PDEVOBJ_vEnableDisplay(ppdevMatch);
454 
455  return ppdevMatch;
456  }
457  }
458 
459  /* Try to get a display driver */
460  if (ldevtype == LDEV_DEVICE_META)
461  pldev = LDEVOBJ_pLoadInternal(MultiEnableDriver, ldevtype);
462  else
463  pldev = LDEVOBJ_pLoadDriver(pdm->dmDeviceName, ldevtype);
464  if (!pldev)
465  {
466  ERR("Could not load display driver '%S'\n",
467  (ldevtype == LDEV_DEVICE_META) ? L"" : pdm->dmDeviceName);
468  return NULL;
469  }
470 
471  /* Allocate a new PDEVOBJ */
472  ppdev = PDEVOBJ_AllocPDEV();
473  if (!ppdev)
474  {
475  ERR("failed to allocate a PDEV\n");
476  return NULL;
477  }
478 
479  if (ldevtype != LDEV_DEVICE_META)
480  {
481  ppdev->pGraphicsDevice = pGraphicsDevice;
482 
483  // DxEngGetHdevData asks for Graphics DeviceObject in hSpooler field
484  ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject;
485 
486  /* Keep selected resolution */
487  if (ppdev->pdmwDev)
489  ppdev->pdmwDev = ExAllocatePoolWithTag(PagedPool, pdm->dmSize + pdm->dmDriverExtra, GDITAG_DEVMODE);
490  if (ppdev->pdmwDev)
491  {
492  RtlCopyMemory(ppdev->pdmwDev, pdm, pdm->dmSize + pdm->dmDriverExtra);
493  /* FIXME: this must be done in a better way */
494  pGraphicsDevice->StateFlags |= DISPLAY_DEVICE_PRIMARY_DEVICE | DISPLAY_DEVICE_ATTACHED_TO_DESKTOP;
495  }
496  }
497 
498  /* FIXME! */
499  ppdev->flFlags = PDEV_DISPLAY;
500 
501  /* HACK: Don't use the pointer */
502  ppdev->Pointer.Exclude.right = -1;
503 
504  /* Initialize PDEV */
505  ppdev->pldev = pldev;
506  ppdev->dwAccelerationLevel = dwAccelerationLevel;
507 
508  /* Copy the function table */
509  if ((ldevtype == LDEV_DEVICE_DISPLAY && dwAccelerationLevel >= 5) ||
510  pdm->dmFields & (DM_PANNINGWIDTH | DM_PANNINGHEIGHT))
511  {
512  ULONG i;
513 
514  /* Initialize missing fields */
515  if (!(pdm->dmFields & DM_PANNINGWIDTH))
516  pdm->dmPanningWidth = pdm->dmPelsWidth;
517  if (!(pdm->dmFields & DM_PANNINGHEIGHT))
518  pdm->dmPanningHeight = pdm->dmPelsHeight;
519 
520  /* Replace vtable by panning vtable */
521  for (i = 0; i < gPanDispDrvCount; i++)
523  }
524  else
525  {
526  ppdev->pfn = ppdev->pldev->pfn;
527  }
528 
529  /* Call the driver to enable the PDEV */
530  if (!PDEVOBJ_bEnablePDEV(ppdev, pdm, NULL))
531  {
532  ERR("Failed to enable PDEV!\n");
533  PDEVOBJ_vRelease(ppdev);
534  EngUnloadImage(pldev);
535  return NULL;
536  }
537 
538  /* Tell the driver that the PDEV is ready */
539  PDEVOBJ_vCompletePDEV(ppdev);
540 
541  /* Create the initial surface */
542  pSurface = PDEVOBJ_pSurface(ppdev);
543  if (!pSurface)
544  {
545  ERR("Failed to create surface\n");
546  PDEVOBJ_vRelease(ppdev);
547  EngUnloadImage(pldev);
548  return NULL;
549  }
550 
551  /* Remove some acceleration capabilities from driver */
553 
554  /* Set MovePointer function */
555  ppdev->pfnMovePointer = ppdev->pfn.MovePointer;
556  if (!ppdev->pfnMovePointer)
558 
559  /* Insert the PDEV into the list */
560  ppdev->ppdevNext = gppdevList;
561  gppdevList = ppdev;
562 
563  /* Return the PDEV */
564  return ppdev;
565 }
566 
568 VOID
570  _Inout_ PVOID pvPointer1,
571  _Inout_ PVOID pvPointer2)
572 {
573  PVOID *ppvPointer1 = pvPointer1;
574  PVOID *ppvPointer2 = pvPointer2;
575  PVOID pvTemp;
576 
577  pvTemp = *ppvPointer1;
578  *ppvPointer1 = *ppvPointer2;
579  *ppvPointer2 = pvTemp;
580 }
581 
582 BOOL
583 NTAPI
585  PPDEVOBJ ppdev,
586  PPDEVOBJ ppdev2)
587 {
588  union
589  {
590  DRIVER_FUNCTIONS pfn;
591  GDIINFO gdiinfo;
592  DEVINFO devinfo;
593  DWORD StateFlags;
594  } temp;
595 
596  /* Exchange driver functions */
597  temp.pfn = ppdev->pfn;
598  ppdev->pfn = ppdev2->pfn;
599  ppdev2->pfn = temp.pfn;
600 
601  /* Exchange LDEVs */
602  SwitchPointer(&ppdev->pldev, &ppdev2->pldev);
603 
604  /* Exchange DHPDEV */
605  SwitchPointer(&ppdev->dhpdev, &ppdev2->dhpdev);
606 
607  /* Exchange surfaces and associate them with their new PDEV */
608  SwitchPointer(&ppdev->pSurface, &ppdev2->pSurface);
609  ppdev->pSurface->SurfObj.hdev = (HDEV)ppdev;
610  ppdev2->pSurface->SurfObj.hdev = (HDEV)ppdev2;
611 
612  /* Exchange devinfo */
613  temp.devinfo = ppdev->devinfo;
614  ppdev->devinfo = ppdev2->devinfo;
615  ppdev2->devinfo = temp.devinfo;
616 
617  /* Exchange gdiinfo */
618  temp.gdiinfo = ppdev->gdiinfo;
619  ppdev->gdiinfo = ppdev2->gdiinfo;
620  ppdev2->gdiinfo = temp.gdiinfo;
621 
622  /* Exchange DEVMODE */
623  SwitchPointer(&ppdev->pdmwDev, &ppdev2->pdmwDev);
624 
625  /* Exchange state flags */
626  temp.StateFlags = ppdev->pGraphicsDevice->StateFlags;
628  ppdev2->pGraphicsDevice->StateFlags = temp.StateFlags;
629 
630  /* Notify each driver instance of its new HDEV association */
631  ppdev->pfn.CompletePDEV(ppdev->dhpdev, (HDEV)ppdev);
632  ppdev2->pfn.CompletePDEV(ppdev2->dhpdev, (HDEV)ppdev2);
633 
634  return TRUE;
635 }
636 
637 
638 BOOL
639 NTAPI
641  PPDEVOBJ ppdev,
642  PDEVMODEW pdm)
643 {
644  PPDEVOBJ ppdevTmp;
646  BOOL retval = FALSE;
647 
648  /* Lock the PDEV */
650 
651  /* And everything else */
653 
654  DPRINT1("PDEVOBJ_bSwitchMode, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface);
655 
656  // Lookup the GraphicsDevice + select DEVMODE
657  // pdm = LDEVOBJ_bProbeAndCaptureDevmode(ppdev, pdm);
658 
659  /* 1. Temporarily disable the current PDEV and reset video to its default mode */
660  if (!PDEVOBJ_bDisableDisplay(ppdev))
661  {
662  DPRINT1("PDEVOBJ_bDisableDisplay() failed\n");
663  goto leave;
664  }
665 
666  /* 2. Create new PDEV */
667  ppdevTmp = PDEVOBJ_Create(ppdev->pGraphicsDevice, pdm, 0, LDEV_DEVICE_DISPLAY);
668  if (!ppdevTmp)
669  {
670  DPRINT1("Failed to create a new PDEV\n");
671  goto leave2;
672  }
673 
674  /* 3. Create a new surface */
675  pSurface = PDEVOBJ_pSurface(ppdevTmp);
676  if (!pSurface)
677  {
678  DPRINT1("PDEVOBJ_pSurface failed\n");
679  PDEVOBJ_vRelease(ppdevTmp);
680  goto leave2;
681  }
682 
683  /* 4. Get DirectDraw information */
684  /* 5. Enable DirectDraw Not traced */
685  /* 6. Copy old PDEV state to new PDEV instance */
686 
687  /* 7. Switch the PDEVs */
688  if (!PDEVOBJ_bDynamicModeChange(ppdev, ppdevTmp))
689  {
690  DPRINT1("PDEVOBJ_bDynamicModeChange() failed\n");
691  PDEVOBJ_vRelease(ppdevTmp);
692  goto leave2;
693  }
694 
695  /* 8. Disable DirectDraw */
696 
697  PDEVOBJ_vRelease(ppdevTmp);
698 
699  /* Update primary display capabilities */
700  if (ppdev == gpmdev->ppdevGlobal)
701  {
702  PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps);
703  }
704 
705  /* Success! */
706  retval = TRUE;
707 
708 leave2:
709  /* Set the new video mode, or restore the original one in case of failure */
710  PDEVOBJ_vEnableDisplay(ppdev);
711 
712 leave:
713  /* Unlock everything else */
715  /* Unlock the PDEV */
717 
718  DPRINT1("leave, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface);
719 
720  return retval;
721 }
722 
723 
724 PPDEVOBJ
725 NTAPI
727  _In_opt_ PUNICODE_STRING pustrDeviceName)
728 {
729  UNICODE_STRING ustrCurrent;
730  PPDEVOBJ ppdev = NULL;
731  PGRAPHICS_DEVICE pGraphicsDevice;
732  ULONG i;
733 
734  /* Acquire PDEV lock */
736 
737  /* Did the caller pass a device name? */
738  if (pustrDeviceName)
739  {
740  /* Loop all present PDEVs */
741  for (i = 0; i < gpmdev->cDev; i++)
742  {
743  /* Get a pointer to the GRAPHICS_DEVICE */
744  pGraphicsDevice = gpmdev->dev[i].ppdev->pGraphicsDevice;
745 
746  /* Compare the name */
747  RtlInitUnicodeString(&ustrCurrent, pGraphicsDevice->szWinDeviceName);
748  if (RtlEqualUnicodeString(pustrDeviceName, &ustrCurrent, FALSE))
749  {
750  /* Found! */
751  ppdev = gpmdev->dev[i].ppdev;
752  break;
753  }
754  }
755  }
756  else if (gpmdev)
757  {
758  /* Otherwise use the primary PDEV */
759  ppdev = gpmdev->ppdevGlobal;
760  }
761 
762  /* Did we find one? */
763  if (ppdev)
764  {
765  /* Yes, reference the PDEV */
766  PDEVOBJ_vReference(ppdev);
767  }
768 
769  /* Release PDEV lock */
771 
772  return ppdev;
773 }
774 
775 LONG
777  _In_opt_ PUNICODE_STRING pustrDeviceName,
778  _In_opt_ PDEVMODEW RequestedMode,
779  _In_opt_ PMDEVOBJ pmdevOld,
780  _Out_ PMDEVOBJ *ppmdevNew,
781  _In_ BOOL bSearchClosestMode)
782 {
783  PGRAPHICS_DEVICE pGraphicsDevice = NULL;
784  PMDEVOBJ pmdev = NULL;
785  PDEVMODEW pdm = NULL;
787  ULONG i, j;
788 
789  TRACE("PDEVOBJ_lChangeDisplaySettings('%wZ' '%dx%dx%d (%d Hz)' %p %p)\n",
790  pustrDeviceName,
791  RequestedMode ? RequestedMode->dmPelsWidth : 0,
792  RequestedMode ? RequestedMode->dmPelsHeight : 0,
793  RequestedMode ? RequestedMode->dmBitsPerPel : 0,
794  RequestedMode ? RequestedMode->dmDisplayFrequency : 0,
795  pmdevOld, ppmdevNew);
796 
797  if (pustrDeviceName)
798  {
799  pGraphicsDevice = EngpFindGraphicsDevice(pustrDeviceName, 0);
800  if (!pGraphicsDevice)
801  {
802  ERR("Wrong device name provided: '%wZ'\n", pustrDeviceName);
803  lRet = DISP_CHANGE_BADPARAM;
804  goto cleanup;
805  }
806  }
807  else if (RequestedMode)
808  {
809  pGraphicsDevice = gpPrimaryGraphicsDevice;
810  if (!pGraphicsDevice)
811  {
812  ERR("Wrong device'\n");
813  lRet = DISP_CHANGE_BADPARAM;
814  goto cleanup;
815  }
816  }
817 
818  if (pGraphicsDevice)
819  {
820  if (!LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, &pdm, bSearchClosestMode))
821  {
822  ERR("DrvProbeAndCaptureDevmode() failed\n");
823  lRet = DISP_CHANGE_BADMODE;
824  goto cleanup;
825  }
826  }
827 
828  /* Here, we know that input parameters were correct */
829 
830  {
831  /* Create new MDEV. Note that if we provide a device name,
832  * MDEV will only contain one device.
833  * */
834 
835  if (pmdevOld)
836  {
837  /* Disable old MDEV */
838  if (MDEVOBJ_bDisable(pmdevOld))
839  {
840  /* Create new MDEV. On failure, reenable old MDEV */
841  pmdev = MDEVOBJ_Create(pustrDeviceName, pdm);
842  if (!pmdev)
843  MDEVOBJ_vEnable(pmdevOld);
844  }
845  }
846  else
847  {
848  pmdev = MDEVOBJ_Create(pustrDeviceName, pdm);
849  }
850 
851  if (!pmdev)
852  {
853  ERR("Failed to create new MDEV\n");
854  lRet = DISP_CHANGE_FAILED;
855  goto cleanup;
856  }
857 
858  lRet = DISP_CHANGE_SUCCESSFUL;
859  *ppmdevNew = pmdev;
860 
861  /* We now have to do the mode switch */
862 
863  if (pustrDeviceName && pmdevOld)
864  {
865  /* We changed settings of one device. Add other devices which were already present */
866  for (i = 0; i < pmdevOld->cDev; i++)
867  {
868  for (j = 0; j < pmdev->cDev; j++)
869  {
870  if (pmdev->dev[j].ppdev->pGraphicsDevice == pmdevOld->dev[i].ppdev->pGraphicsDevice)
871  {
872  if (PDEVOBJ_bDynamicModeChange(pmdevOld->dev[i].ppdev, pmdev->dev[j].ppdev))
873  {
874  PPDEVOBJ tmp = pmdevOld->dev[i].ppdev;
875  pmdevOld->dev[i].ppdev = pmdev->dev[j].ppdev;
876  pmdev->dev[j].ppdev = tmp;
877  }
878  else
879  {
880  ERR("Failed to apply new settings\n");
882  ASSERT(FALSE);
883  }
884  break;
885  }
886  }
887  if (j == pmdev->cDev)
888  {
889  PDEVOBJ_vReference(pmdevOld->dev[i].ppdev);
890  pmdev->dev[pmdev->cDev].ppdev = pmdevOld->dev[i].ppdev;
891  pmdev->cDev++;
892  }
893  }
894  }
895 
896  if (pmdev->cDev == 1)
897  {
898  pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
899  }
900  else
901  {
902  /* Enable MultiDriver */
904  if (!pmdev->ppdevGlobal)
905  {
906  WARN("Failed to create meta-device. Using only first display\n");
907  PDEVOBJ_vReference(pmdev->dev[0].ppdev);
908  pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
909  }
910  }
911 
912  if (pmdevOld)
913  {
914  /* Search PDEVs which were in pmdevOld, but are not anymore in pmdev, and disable them */
915  for (i = 0; i < pmdevOld->cDev; i++)
916  {
917  for (j = 0; j < pmdev->cDev; j++)
918  {
919  if (pmdev->dev[j].ppdev->pGraphicsDevice == pmdevOld->dev[i].ppdev->pGraphicsDevice)
920  break;
921  }
922  if (j == pmdev->cDev)
923  PDEVOBJ_bDisableDisplay(pmdevOld->dev[i].ppdev);
924  }
925  }
926  }
927 
928 cleanup:
929  if (lRet != DISP_CHANGE_SUCCESSFUL)
930  {
931  *ppmdevNew = NULL;
932  if (pmdev)
933  MDEVOBJ_vDestroy(pmdev);
934  if (pdm && pdm != RequestedMode)
936  }
937 
938  return lRet;
939 }
940 
941 INT
942 NTAPI
944 {
945  INT ret = CM_NONE;
946 
947  if (ppdev->flFlags & PDEV_DISPLAY)
948  {
949  if (ppdev->devinfo.iDitherFormat == BMF_8BPP ||
951  ret = CM_GAMMA_RAMP;
952  }
953 
955  ret |= CM_CMYK_COLOR;
956  if (ppdev->devinfo.flGraphicsCaps & GCAPS_ICM)
957  ret |= CM_DEVICE_ICM;
958 
959  return ret;
960 }
961 
962 VOID
963 NTAPI
965  IN PPDEVOBJ ppdev,
967 {
968  PGDIINFO pGdiInfo = &ppdev->gdiinfo;
969 
970  pDevCaps->ulVersion = pGdiInfo->ulVersion;
971  pDevCaps->ulTechnology = pGdiInfo->ulTechnology;
972  pDevCaps->ulHorzSizeM = (pGdiInfo->ulHorzSize + 500) / 1000;
973  pDevCaps->ulVertSizeM = (pGdiInfo->ulVertSize + 500) / 1000;
974  pDevCaps->ulHorzSize = pGdiInfo->ulHorzSize;
975  pDevCaps->ulVertSize = pGdiInfo->ulVertSize;
976  pDevCaps->ulHorzRes = pGdiInfo->ulHorzRes;
977  pDevCaps->ulVertRes = pGdiInfo->ulVertRes;
978  pDevCaps->ulBitsPixel = pGdiInfo->cBitsPixel;
979  if (pDevCaps->ulBitsPixel == 15) pDevCaps->ulBitsPixel = 16;
980  pDevCaps->ulPlanes = pGdiInfo->cPlanes;
981  pDevCaps->ulNumPens = pGdiInfo->ulNumColors;
982  if (pDevCaps->ulNumPens != -1) pDevCaps->ulNumPens *= 5;
983  pDevCaps->ulNumFonts = 0; // PDEVOBJ_cFonts(ppdev);
984  pDevCaps->ulNumColors = pGdiInfo->ulNumColors;
985  pDevCaps->ulRasterCaps = pGdiInfo->flRaster;
986  pDevCaps->ulAspectX = pGdiInfo->ulAspectX;
987  pDevCaps->ulAspectY = pGdiInfo->ulAspectY;
988  pDevCaps->ulAspectXY = pGdiInfo->ulAspectXY;
989  pDevCaps->ulLogPixelsX = pGdiInfo->ulLogPixelsX;
990  pDevCaps->ulLogPixelsY = pGdiInfo->ulLogPixelsY;
991  pDevCaps->ulSizePalette = pGdiInfo->ulNumPalReg;
992  pDevCaps->ulColorRes = pGdiInfo->ulDACRed +
993  pGdiInfo->ulDACGreen +
994  pGdiInfo->ulDACBlue;
995  pDevCaps->ulPhysicalWidth = pGdiInfo->szlPhysSize.cx;
999  pDevCaps->ulTextCaps = pGdiInfo->flTextCaps;
1001  if (pGdiInfo->ulTechnology != DT_PLOTTER)
1003  pDevCaps->ulVRefresh = pGdiInfo->ulVRefresh;
1004  pDevCaps->ulDesktopHorzRes = pGdiInfo->ulHorzRes;
1005  pDevCaps->ulDesktopVertRes = pGdiInfo->ulVertRes;
1006  pDevCaps->ulBltAlignment = pGdiInfo->ulBltAlignment;
1011  pDevCaps->ulShadeBlend = pGdiInfo->flShadeBlend;
1013 }
1014 
1015 
1018 /*
1019  * @implemented
1020  */
1021 BOOL
1022 APIENTRY
1024  _In_ HDEV hdev,
1025  _In_ ENG_DEVICE_ATTRIBUTE devAttr,
1026  _In_reads_bytes_(cjInSize) PVOID pvIn,
1027  _In_ ULONG cjInSize,
1028  _Out_writes_bytes_(cjOutSize) PVOID pvOut,
1029  _In_ ULONG cjOutSize)
1030 {
1031  PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
1032 
1033  if (devAttr != QDA_ACCELERATION_LEVEL)
1034  return FALSE;
1035 
1036  if (cjOutSize >= sizeof(DWORD))
1037  {
1038  /* Set all Accelerations Level Key to enabled Full 0 to 5 turned off. */
1039  *(DWORD*)pvOut = ppdev->dwAccelerationLevel;
1040  return TRUE;
1041  }
1042 
1043  return FALSE;
1044 }
1045 
1047 LPWSTR
1048 APIENTRY
1050 {
1051  PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
1052 
1053  ASSERT(ppdev);
1054  ASSERT(ppdev->pldev);
1055  ASSERT(ppdev->pldev->pGdiDriverInfo);
1056  ASSERT(ppdev->pldev->pGdiDriverInfo->DriverName.Buffer);
1057 
1058  return ppdev->pldev->pGdiDriverInfo->DriverName.Buffer;
1059 }
1060 
1061 
1062 INT
1063 APIENTRY
1065  HDC hdc,
1066  INT Index)
1067 {
1068  PDC pdc;
1069  DEVCAPS devcaps;
1070 
1071  /* Lock the given DC */
1072  pdc = DC_LockDc(hdc);
1073  if (!pdc)
1074  {
1076  return 0;
1077  }
1078 
1079  /* Get the data */
1080  PDEVOBJ_vGetDeviceCaps(pdc->ppdev, &devcaps);
1081 
1082  /* Unlock the DC */
1083  DC_UnlockDc(pdc);
1084 
1085  /* Return capability */
1086  switch (Index)
1087  {
1088  case DRIVERVERSION:
1089  return devcaps.ulVersion;
1090 
1091  case TECHNOLOGY:
1092  return devcaps.ulTechnology;
1093 
1094  case HORZSIZE:
1095  return devcaps.ulHorzSize;
1096 
1097  case VERTSIZE:
1098  return devcaps.ulVertSize;
1099 
1100  case HORZRES:
1101  return devcaps.ulHorzRes;
1102 
1103  case VERTRES:
1104  return devcaps.ulVertRes;
1105 
1106  case LOGPIXELSX:
1107  return devcaps.ulLogPixelsX;
1108 
1109  case LOGPIXELSY:
1110  return devcaps.ulLogPixelsY;
1111 
1112  case BITSPIXEL:
1113  return devcaps.ulBitsPixel;
1114 
1115  case PLANES:
1116  return devcaps.ulPlanes;
1117 
1118  case NUMBRUSHES:
1119  return -1;
1120 
1121  case NUMPENS:
1122  return devcaps.ulNumPens;
1123 
1124  case NUMFONTS:
1125  return devcaps.ulNumFonts;
1126 
1127  case NUMCOLORS:
1128  return devcaps.ulNumColors;
1129 
1130  case ASPECTX:
1131  return devcaps.ulAspectX;
1132 
1133  case ASPECTY:
1134  return devcaps.ulAspectY;
1135 
1136  case ASPECTXY:
1137  return devcaps.ulAspectXY;
1138 
1139  case CLIPCAPS:
1140  return CP_RECTANGLE;
1141 
1142  case SIZEPALETTE:
1143  return devcaps.ulSizePalette;
1144 
1145  case NUMRESERVED:
1146  return 20;
1147 
1148  case COLORRES:
1149  return devcaps.ulColorRes;
1150 
1151  case DESKTOPVERTRES:
1152  return devcaps.ulVertRes;
1153 
1154  case DESKTOPHORZRES:
1155  return devcaps.ulHorzRes;
1156 
1157  case BLTALIGNMENT:
1158  return devcaps.ulBltAlignment;
1159 
1160  case SHADEBLENDCAPS:
1161  return devcaps.ulShadeBlend;
1162 
1163  case COLORMGMTCAPS:
1164  return devcaps.ulColorMgmtCaps;
1165 
1166  case PHYSICALWIDTH:
1167  return devcaps.ulPhysicalWidth;
1168 
1169  case PHYSICALHEIGHT:
1170  return devcaps.ulPhysicalHeight;
1171 
1172  case PHYSICALOFFSETX:
1173  return devcaps.ulPhysicalOffsetX;
1174 
1175  case PHYSICALOFFSETY:
1176  return devcaps.ulPhysicalOffsetY;
1177 
1178  case VREFRESH:
1179  return devcaps.ulVRefresh;
1180 
1181  case RASTERCAPS:
1182  return devcaps.ulRasterCaps;
1183 
1184  case CURVECAPS:
1185  return (CC_CIRCLES | CC_PIE | CC_CHORD | CC_ELLIPSES | CC_WIDE |
1187 
1188  case LINECAPS:
1189  return (LC_POLYLINE | LC_MARKER | LC_POLYMARKER | LC_WIDE |
1191 
1192  case POLYGONALCAPS:
1195 
1196  case TEXTCAPS:
1197  return devcaps.ulTextCaps;
1198 
1199  case CAPS1:
1200  case PDEVICESIZE:
1201  case SCALINGFACTORX:
1202  case SCALINGFACTORY:
1203  default:
1204  return 0;
1205  }
1206 
1207  return 0;
1208 }
1209 
1211 BOOL
1212 APIENTRY
1213 NtGdiGetDeviceCapsAll(
1214  IN HDC hDC,
1216 {
1217  PDC pdc;
1218  DEVCAPS devcaps;
1219  BOOL bResult = TRUE;
1220 
1221  /* Lock the given DC */
1222  pdc = DC_LockDc(hDC);
1223  if (!pdc)
1224  {
1226  return FALSE;
1227  }
1228 
1229  /* Get the data */
1230  PDEVOBJ_vGetDeviceCaps(pdc->ppdev, &devcaps);
1231 
1232  /* Unlock the DC */
1233  DC_UnlockDc(pdc);
1234 
1235  /* Copy data to caller */
1236  _SEH2_TRY
1237  {
1238  ProbeForWrite(pDevCaps, sizeof(DEVCAPS), 1);
1239  RtlCopyMemory(pDevCaps, &devcaps, sizeof(DEVCAPS));
1240  }
1242  {
1244  bResult = FALSE;
1245  }
1246  _SEH2_END;
1247 
1248  return bResult;
1249 }
1250 
1251 DHPDEV
1252 APIENTRY
1254  IN HDEV hdev)
1255 {
1256  PPDEVOBJ ppdev;
1257  DHPDEV dhpdev = NULL;
1258 
1259  /* Check parameter */
1260  if (!hdev || (PCHAR)hdev < (PCHAR)MmSystemRangeStart)
1261  return NULL;
1262 
1263  /* Lock PDEV list */
1264  EngAcquireSemaphoreShared(ghsemPDEV);
1265 
1266  /* Walk through the list of PDEVs */
1267  for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
1268  {
1269  /* Compare with the given HDEV */
1270  if (ppdev == (PPDEVOBJ)hdev)
1271  {
1272  /* Found the PDEV! Get it's dhpdev and break */
1273  dhpdev = ppdev->dhpdev;
1274  break;
1275  }
1276  }
1277 
1278  /* Unlock PDEV list */
1280 
1281  return dhpdev;
1282 }
1283 
1284 PSIZEL
1285 FASTCALL
1287 {
1288  if (ppdev->flFlags & PDEV_META_DEVICE)
1289  {
1290  *psizl = ppdev->szlMetaRes;
1291  }
1292  else
1293  {
1294  psizl->cx = ppdev->gdiinfo.ulHorzRes;
1295  psizl->cy = ppdev->gdiinfo.ulVertRes;
1296  }
1297  return psizl;
1298 }
DHPDEV dhpdev
Definition: pdevobj.h:120
#define CP_RECTANGLE
Definition: wingdi.h:826
BOOL NTAPI PDEVOBJ_bSwitchMode(PPDEVOBJ ppdev, PDEVMODEW pdm)
Definition: pdevobj.c:640
SIZEL szlPhysSize
Definition: winddi.h:901
#define DESKTOPHORZRES
Definition: wingdi.h:742
signed char * PCHAR
Definition: retypes.h:7
#define CC_PIE
Definition: wingdi.h:762
_Out_ PDEVCAPS pDevCaps
Definition: ntgdi.h:2664
#define DESKTOPVERTRES
Definition: wingdi.h:743
VOID WINAPI EngReleaseSemaphore(IN HSEMAPHORE hsem)
Definition: eng.c:235
#define NUMBRUSHES
Definition: wingdi.h:722
ULONG iFunc
Definition: winddi.h:530
#define CC_CHORD
Definition: wingdi.h:763
#define BITSPIXEL
Definition: wingdi.h:720
#define IN
Definition: typedefs.h:39
LONG cPdevRefs
Definition: pdevobj.h:84
#define RC_STRETCHBLT
Definition: wingdi.h:755
#define HORZRES
Definition: wingdi.h:716
#define LOGPIXELSX
Definition: wingdi.h:718
#define TC_UA_ABLE
Definition: wingdi.h:818
ULONG flShadeBlend
Definition: winddi.h:920
ULONG ulBltAlignment
Definition: ntgdityp.h:327
#define NUMRESERVED
Definition: wingdi.h:733
BOOL NTAPI PDEVOBJ_bDynamicModeChange(PPDEVOBJ ppdev, PPDEVOBJ ppdev2)
Definition: pdevobj.c:584
#define HS_DDI_MAX
Definition: winddi.h:3954
_In_ ULONG cj
Definition: winddi.h:3540
#define LC_WIDE
Definition: wingdi.h:775
PFN_DrvEnableSurface EnableSurface
Definition: ntgdityp.h:572
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define GCAPS_CMYKCOLOR
Definition: winddi.h:347
#define GDITAG_DEVMODE
Definition: tags.h:73
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
ULONG ulHorzRes
Definition: ntgdityp.h:304
INT NTAPI PDEVOBJ_iGetColorManagementCaps(PPDEVOBJ ppdev)
Definition: pdevobj.c:943
#define _In_opt_
Definition: ms_sal.h:309
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
ULONG ulDACRed
Definition: winddi.h:891
#define _Inout_
Definition: ms_sal.h:378
PDEVICE_OBJECT DeviceObject
Definition: pdevobj.h:63
struct _LDEVOBJ * pldev
Definition: pdevobj.h:119
#define PC_INTERIORS
Definition: wingdi.h:804
#define RC_BIGFONT
Definition: wingdi.h:781
#define HOOK_TRANSPARENTBLT
Definition: winddi.h:1434
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
#define _Out_
Definition: ms_sal.h:345
PFN_DrvMovePointer pfnMovePointer
Definition: pdevobj.h:113
#define ASPECTX
Definition: wingdi.h:727
BOOL LDEVOBJ_bProbeAndCaptureDevmode(_Inout_ PGRAPHICS_DEVICE pGraphicsDevice, _In_ PDEVMODEW RequestedMode, _Out_ PDEVMODEW *pSelectedMode, _In_ BOOL bSearchClosestMode)
Definition: ldevobj.c:735
ULONG ulVertSizeM
Definition: ntgdityp.h:301
WCHAR szWinDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:60
ULONG ulRasterCaps
Definition: ntgdityp.h:311
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.h:161
#define RC_GDI20_OUTPUT
Definition: wingdi.h:786
#define TRUE
Definition: types.h:120
PSURFACE NTAPI PDEVOBJ_pSurface(PPDEVOBJ ppdev)
Definition: pdevobj.c:310
uint16_t * PWSTR
Definition: typedefs.h:56
#define LC_POLYLINE
Definition: wingdi.h:772
GDIINFO gdiinfo
Definition: pdevobj.h:123
NTSTATUS NTAPI InitPDEVImpl(VOID)
Definition: pdevobj.c:30
_Must_inspect_result_ _Ret_z_ LPWSTR APIENTRY EngGetDriverName(_In_ HDEV hdev)
Definition: pdevobj.c:1049
DWORD StateFlags
Definition: pdevobj.h:66
#define CC_STYLED
Definition: wingdi.h:766
ULONG ulNumFonts
Definition: ntgdityp.h:309
ULONG yPanningAlignment
Definition: winddi.h:914
#define WARN(fmt,...)
Definition: debug.h:112
ULONG ulAspectY
Definition: winddi.h:895
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
ULONG ulDesktopVertRes
Definition: ntgdityp.h:326
#define DM_PANNINGWIDTH
Definition: wingdi.h:1277
LONG NTSTATUS
Definition: precomp.h:26
PPDEVOBJ PDEVOBJ_Create(_In_opt_ PGRAPHICS_DEVICE pGraphicsDevice, _In_opt_ PDEVMODEW pdm, _In_ ULONG dwAccelerationLevel, _In_ ULONG ldevtype)
Definition: pdevobj.c:411
#define COLORRES
Definition: wingdi.h:734
static HDC
Definition: imagelist.c:92
#define DRIVERVERSION
Definition: wingdi.h:705
#define PDEVICESIZE
Definition: wingdi.h:730
_Requires_lock_not_held_ hsem ENGAPI VOID APIENTRY EngDeleteSemaphore(_Inout_ __drv_freesMem(Mem) HSEMAPHORE hsem)
Definition: semaphor.c:106
#define DISP_CHANGE_BADMODE
Definition: winuser.h:195
#define BLTALIGNMENT
Definition: wingdi.h:744
ULONG ulHorzSize
Definition: ntgdityp.h:302
PDEVMODEENTRY pDevModeList
Definition: pdevobj.h:70
#define SCALINGFACTORX
Definition: wingdi.h:739
#define RC_BITMAP64
Definition: wingdi.h:783
ULONG ulLogPixelsY
Definition: winddi.h:889
ULONG ulPanningHorzRes
Definition: winddi.h:911
#define LC_POLYMARKER
Definition: wingdi.h:774
#define POLYGONALCAPS
Definition: wingdi.h:779
static VOID PDEVOBJ_vFilterDriverHooks(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.c:254
ULONG ulBitsPixel
Definition: ntgdityp.h:306
ULONG cPlanes
Definition: winddi.h:885
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
#define PC_WINDPOLYGON
Definition: wingdi.h:798
ULONG flTextCaps
Definition: winddi.h:890
VOID MDEVOBJ_vDestroy(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:162
PVOID apfn[INDEX_LAST]
Definition: pdevobj.h:139
PGRAPHICS_DEVICE gpPrimaryGraphicsDevice
Definition: device.c:15
#define TC_SO_ABLE
Definition: wingdi.h:819
ULONG ulPhysicalHeight
Definition: ntgdityp.h:320
#define RASTERCAPS
Definition: wingdi.h:745
#define FASTCALL
Definition: nt_native.h:50
#define DT_RASDISPLAY
Definition: wingdi.h:708
int32_t INT
Definition: typedefs.h:58
#define TECHNOLOGY
Definition: wingdi.h:706
ULONG ulVRefresh
Definition: ntgdityp.h:324
#define RC_FLOODFILL
Definition: wingdi.h:751
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
LONG y
Definition: windef.h:330
struct _PDEVOBJ * ppdevNext
Definition: pdevobj.h:83
_SEH2_TRY
Definition: create.c:4226
#define TEXTCAPS
Definition: wingdi.h:806
PFN pfn
Definition: winddi.h:531
#define HOOK_GRADIENTFILL
Definition: winddi.h:1436
ULONG ulPanningVertRes
Definition: ntgdityp.h:329
#define PHYSICALHEIGHT
Definition: wingdi.h:736
#define HOOK_ALPHABLEND
Definition: winddi.h:1435
ULONG ulNumPalReg
Definition: winddi.h:902
ULONG ulShadeBlend
Definition: ntgdityp.h:332
ULONG ulVertSize
Definition: winddi.h:881
long right
Definition: polytest.cpp:53
#define PC_WIDESTYLED
Definition: wingdi.h:803
#define L(x)
Definition: ntvdm.h:50
INT APIENTRY NtGdiGetDeviceCaps(HDC hdc, INT Index)
Definition: pdevobj.c:1064
#define HOOK_FILLPATH
Definition: winddi.h:1426
ULONG ulDACGreen
Definition: winddi.h:892
#define NUMCOLORS
Definition: wingdi.h:725
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
POINTL ptlPhysOffset
Definition: winddi.h:900
FLONG flFlags
Definition: pdevobj.h:87
#define FALSE
Definition: types.h:117
ULONG ulVersion
Definition: winddi.h:878
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
VOID MDEVOBJ_vEnable(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:17
ULONG ulNumPens
Definition: ntgdityp.h:308
ULONG ulVertRes
Definition: ntgdityp.h:305
RECTL Exclude
Definition: pdevobj.h:39
#define HOOK_FLAGS
Definition: winddi.h:1438
ULONG gPanDispDrvCount
Definition: pandisp.c:501
SURFOBJ SurfObj
Definition: surface.h:8
#define DISP_CHANGE_FAILED
Definition: winuser.h:194
#define DISP_CHANGE_BADPARAM
Definition: winuser.h:193
#define VREFRESH
Definition: wingdi.h:741
#define CC_INTERIORS
Definition: wingdi.h:768
ULONG ulVertSize
Definition: ntgdityp.h:303
static HSEMAPHORE ghsemPDEV
Definition: pdevobj.c:15
ULONG ulHorzRes
Definition: winddi.h:882
ENGAPI VOID APIENTRY EngAcquireSemaphore(_Inout_ HSEMAPHORE hsem)
ULONG xPanningAlignment
Definition: ntgdityp.h:330
ULONG ulAspectXY
Definition: ntgdityp.h:314
#define LC_MARKER
Definition: wingdi.h:773
#define _In_
Definition: ms_sal.h:308
LONG cx
Definition: windef.h:334
ULONG ulTechnology
Definition: winddi.h:879
struct _PDEVOBJ * PPDEVOBJ
Definition: mdevobj.h:6
PDEVMODEW pdmwDev
Definition: pdevobj.h:129
HSEMAPHORE hsemDevLock
Definition: pdevobj.h:89
DRIVER_FUNCTIONS pfn
Definition: pdevobj.h:138
ULONG iDitherFormat
Definition: winddi.h:395
#define HOOK_LINETO
Definition: winddi.h:1428
VOID NTAPI PDEVOBJ_vGetDeviceCaps(IN PPDEVOBJ ppdev, OUT PDEVCAPS pDevCaps)
Definition: pdevobj.c:964
HSURF gahsurfHatch[HS_DDI_MAX]
Definition: engbrush.c:24
BOOL APIENTRY EngQueryDeviceAttribute(_In_ HDEV hdev, _In_ ENG_DEVICE_ATTRIBUTE devAttr, _In_reads_bytes_(cjInSize) PVOID pvIn, _In_ ULONG cjInSize, _Out_writes_bytes_(cjOutSize) PVOID pvOut, _In_ ULONG cjOutSize)
Definition: pdevobj.c:1023
ULONG ulAspectXY
Definition: winddi.h:896
SIZEL szlMetaRes
Definition: pdevobj.h:108
ULONG xPanningAlignment
Definition: winddi.h:913
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
#define TC_VA_ABLE
Definition: wingdi.h:821
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define SCALINGFACTORY
Definition: wingdi.h:740
#define TC_OP_STROKE
Definition: wingdi.h:808
SYSTEM_GDI_DRIVER_INFORMATION * pGdiDriverInfo
Definition: ldevobj.h:19
#define PC_STYLED
Definition: wingdi.h:802
VOID NTAPI PDEVOBJ_vCompletePDEV(PPDEVOBJ ppdev)
Definition: pdevobj.c:244
BASEOBJECT BaseObject
Definition: surface.h:6
#define HOOK_TEXTOUT
Definition: winddi.h:1423
#define CC_WIDE
Definition: wingdi.h:765
ULONG ulColorRes
Definition: ntgdityp.h:318
ULONG ulPhysicalOffsetY
Definition: ntgdityp.h:322
#define LC_STYLED
Definition: wingdi.h:776
ULONG ulAspectY
Definition: ntgdityp.h:313
#define GCAPS2_CHANGEGAMMARAMP
Definition: winddi.h:370
#define DISPLAY_DEVICE_PRIMARY_DEVICE
Definition: wingdi.h:1398
#define PC_WIDE
Definition: wingdi.h:801
#define GdiHandleTable
Definition: win32nt.h:35
ULONG ulPlanes
Definition: ntgdityp.h:307
#define TRACE(s)
Definition: solgame.cpp:4
Definition: polytest.cpp:40
#define ASPECTXY
Definition: wingdi.h:729
static PPDEVOBJ gppdevList
Definition: pdevobj.c:14
#define RC_OP_DX_OUTPUT
Definition: wingdi.h:789
ULONG ulVersion
Definition: ntgdityp.h:298
ULONG ulBltAlignment
Definition: winddi.h:910
#define HOOK_BITBLT
Definition: winddi.h:1420
ULONG ulDACBlue
Definition: winddi.h:893
#define ASSERT(a)
Definition: mode.c:44
NTSYSAPI ULONG NTAPI RtlEqualMemory(CONST VOID *Source1, CONST VOID *Source2, ULONG Length)
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
#define PHYSICALOFFSETY
Definition: wingdi.h:738
DWORD_PTR HSEMAPHORE
Definition: axcore.idl:60
_In_ WDFCOLLECTION _In_ ULONG Index
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
BOOL MDEVOBJ_bDisable(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:29
struct _DEVMODEINFO * pdmiNext
Definition: pdevobj.h:44
DEVINFO devinfo
Definition: pdevobj.h:122
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
Definition: wingdi.h:1396
#define RC_PALETTE
Definition: wingdi.h:790
WORD dmSize
Definition: wingdi.h:1620
#define CC_ROUNDRECT
Definition: wingdi.h:769
#define ASPECTY
Definition: wingdi.h:728
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
static VOID PDEVOBJ_vDeletePDEV(PPDEVOBJ ppdev)
Definition: pdevobj.c:91
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG x
Definition: windef.h:329
#define CLIPCAPS
Definition: wingdi.h:731
#define RC_BITBLT
Definition: wingdi.h:782
BOOL PDEVOBJ_bDisableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:360
#define DT_PLOTTER
Definition: wingdi.h:707
ULONG ulHorzSize
Definition: winddi.h:880
PSIZEL FASTCALL PDEVOBJ_sizl(PPDEVOBJ ppdev, PSIZEL psizl)
Definition: pdevobj.c:1286
ULONG ulPanningHorzRes
Definition: ntgdityp.h:328
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
HANDLE hSpooler
Definition: pdevobj.h:125
ULONG ulDesktopHorzRes
Definition: ntgdityp.h:325
#define LC_WIDESTYLED
Definition: wingdi.h:777
DBG_DEFAULT_CHANNEL(EngPDev)
#define HOOK_SYNCHRONIZE
Definition: winddi.h:1431
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define SIZEPALETTE
Definition: wingdi.h:732
#define INDEX_DrvSetPointerShape
Definition: winddi.h:445
#define DT_CHARSTREAM
Definition: wingdi.h:711
int ret
#define GCAPS_ICM
Definition: winddi.h:346
PMDEVOBJ MDEVOBJ_Create(_In_opt_ PUNICODE_STRING pustrDeviceName, _In_opt_ PDEVMODEW pdm)
Definition: mdevobj.c:57
#define _Ret_z_
Definition: ms_sal.h:524
#define InterlockedDecrement
Definition: armddk.h:52
HDEV hdev
Definition: winddi.h:1208
BOOL APIENTRY MultiEnableDriver(_In_ ULONG iEngineVersion, _In_ ULONG cj, _Inout_bytecount_(cj) PDRVENABLEDATA pded)
Definition: multidisp.c:17
ULONG ulLogPixelsY
Definition: ntgdityp.h:316
HDC hdc
Definition: main.c:9
ULONG flRaster
Definition: winddi.h:887
ULONG ulVRefresh
Definition: winddi.h:909
#define CC_ELLIPSES
Definition: wingdi.h:764
#define TC_OP_CHARACTER
Definition: wingdi.h:807
PGRAPHICS_DEVICE NTAPI EngpFindGraphicsDevice(_In_opt_ PUNICODE_STRING pustrDevice, _In_ ULONG iDevNum)
Definition: device.c:433
ULONG ulPhysicalOffsetX
Definition: ntgdityp.h:321
BOOL NTAPI PDEVOBJ_bEnablePDEV(_In_ PPDEVOBJ ppdev, _In_ PDEVMODEW pdevmode, _In_ PWSTR pwszLogAddress)
Definition: pdevobj.c:173
DHPDEV APIENTRY NtGdiGetDhpdev(IN HDEV hdev)
Definition: pdevobj.c:1253
ULONG cBitsPixel
Definition: winddi.h:884
ULONG ulAspectX
Definition: winddi.h:894
_In_ ULONG _Inout_bytecount_(cj) DRVENABLEDATA *pded)
Definition: winddi.h:3541
#define CAPS1
Definition: mmsystem.h:934
#define RC_DI_BITMAP
Definition: wingdi.h:785
#define _Must_inspect_result_
Definition: ms_sal.h:558
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:37
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:149
#define GDITAG_GDEVICE
Definition: tags.h:99
PFN_DrvMovePointer MovePointer
Definition: ntgdityp.h:599
#define HORZSIZE
Definition: wingdi.h:714
#define HOOK_COPYBITS
Definition: winddi.h:1429
#define ERR(fmt,...)
Definition: debug.h:110
#define PHYSICALOFFSETX
Definition: wingdi.h:737
VOID PDEVOBJ_vEnableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:340
static HDC hDC
Definition: 3dtext.c:33
#define HOOK_STRETCHBLT
Definition: winddi.h:1421
#define PHYSICALWIDTH
Definition: wingdi.h:735
#define PC_RECTANGLE
Definition: wingdi.h:797
#define VERTSIZE
Definition: wingdi.h:715
_Success_(return!=FALSE)
Definition: pdevobj.c:1210
_SEH2_END
Definition: create.c:4400
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
#define RC_STRETCHDIB
Definition: wingdi.h:756
#define NUMPENS
Definition: wingdi.h:723
#define LINECAPS
Definition: wingdi.h:770
static calc_node_t temp
Definition: rpn_ieee.c:38
FLONG flGraphicsCaps
Definition: winddi.h:390
ULONG ulTextCaps
Definition: ntgdityp.h:323
PVOID apfn[INDEX_LAST]
Definition: ldevobj.h:26
PPDEVOBJ ppdevGlobal
Definition: mdevobj.h:16
#define FORCEINLINE
Definition: wdftypes.h:67
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
PMDEVOBJ gpmdev
Definition: mdevobj.c:14
PPDEVOBJ PDEVOBJ_AllocPDEV(VOID)
Definition: pdevobj.c:62
unsigned int * PULONG
Definition: retypes.h:1
PPDEVOBJ ppdev
Definition: mdevobj.h:10
VOID NTAPI GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
Definition: gdiobj.c:734
#define NULL
Definition: types.h:112
ULONG ulPhysicalWidth
Definition: ntgdityp.h:319
#define VERTRES
Definition: wingdi.h:717
PLDEVOBJ LDEVOBJ_pLoadInternal(_In_ PFN_DrvEnableDriver pfnEnableDriver, _In_ ULONG ldevtype)
Definition: ldevobj.c:303
PSURFACE pSurface
Definition: pdevobj.h:124
#define RC_DIBTODEV
Definition: wingdi.h:750
ULONG ulPanningVertRes
Definition: winddi.h:912
GDIPOINTER Pointer
Definition: pdevobj.h:144
#define PC_POLYGON
Definition: wingdi.h:794
#define leave
Definition: btrfs_drv.h:138
ULONG ulNumColors
Definition: winddi.h:886
#define DPRINT1
Definition: precomp.h:8
#define PC_SCANLINE
Definition: wingdi.h:799
VOID NTAPI PDEVOBJ_vRefreshModeList(PPDEVOBJ ppdev)
Definition: pdevobj.c:380
ULONG ulAspectX
Definition: ntgdityp.h:312
DRVFN gPanDispDrvFn[]
Definition: pandisp.c:477
#define INDEX_DrvCreateDeviceBitmap
Definition: winddi.h:426
#define OUT
Definition: typedefs.h:40
HSEMAPHORE WINAPI EngCreateSemaphore(VOID)
Definition: eng.c:75
FN_DrvEnablePDEV * PFN_DrvEnablePDEV
Definition: winddi.h:3558
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNIMPLEMENTED
Definition: debug.h:115
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
ENGAPI VOID APIENTRY EngUnloadImage(_In_ HANDLE hModule)
Definition: ldevobj.c:888
LDEVTYPE ldevtype
Definition: ldevobj.h:20
ULONG ulColorMgmtCaps
Definition: ntgdityp.h:333
char * cleanup(char *str)
Definition: wpickclick.c:99
ENGAPI VOID APIENTRY EngMovePointer(_In_ SURFOBJ *pso, _In_ LONG x, _In_ LONG y, _In_ RECTL *prcl)
Definition: mouse.c:566
enum _ENG_DEVICE_ATTRIBUTE ENG_DEVICE_ATTRIBUTE
ULONG ulHorzSizeM
Definition: ntgdityp.h:300
BOOL LDEVOBJ_bBuildDevmodeList(_Inout_ PGRAPHICS_DEVICE pGraphicsDevice)
Definition: ldevobj.c:563
#define LOGPIXELSY
Definition: wingdi.h:719
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
ULONG ulNumColors
Definition: ntgdityp.h:310
#define CC_WIDESTYLED
Definition: wingdi.h:767
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:40
#define STATUS_SUCCESS
Definition: shellext.h:65
PFN_DrvCompletePDEV CompletePDEV
Definition: ntgdityp.h:570
Definition: xlate.c:10
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
ULONG ulLogPixelsX
Definition: winddi.h:888
ULONG ulVertRes
Definition: winddi.h:883
DWORD dwAccelerationLevel
Definition: pdevobj.h:132
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define GCAPS_PALMANAGED
Definition: winddi.h:341
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:104
ULONG ulSizePalette
Definition: ntgdityp.h:317
LONG PDEVOBJ_lChangeDisplaySettings(_In_opt_ PUNICODE_STRING pustrDeviceName, _In_opt_ PDEVMODEW RequestedMode, _In_opt_ PMDEVOBJ pmdevOld, _Out_ PMDEVOBJ *ppmdevNew, _In_ BOOL bSearchClosestMode)
Definition: pdevobj.c:776
#define DM_PANNINGHEIGHT
Definition: wingdi.h:1278
ULONG yPanningAlignment
Definition: ntgdityp.h:331
#define CC_CIRCLES
Definition: wingdi.h:761
ULONG ulLogPixelsX
Definition: ntgdityp.h:315
#define HOOK_STROKEPATH
Definition: winddi.h:1425
#define LC_INTERIORS
Definition: wingdi.h:778
PDEVMODEINFO pdevmodeInfo
Definition: pdevobj.h:68
PGRAPHICS_DEVICE pGraphicsDevice
Definition: pdevobj.h:127
#define TC_CP_STROKE
Definition: wingdi.h:809
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define CURVECAPS
Definition: wingdi.h:759
#define NUMFONTS
Definition: wingdi.h:724
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
FORCEINLINE VOID SwitchPointer(_Inout_ PVOID pvPointer1, _Inout_ PVOID pvPointer2)
Definition: pdevobj.c:569
#define GDITAG_PDEV
Definition: tags.h:75
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
LONG cy
Definition: windef.h:335
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
Definition: winddi.h:529
FLONG flGraphicsCaps2
Definition: winddi.h:399
#define MmSystemRangeStart
Definition: mm.h:32
_In_ HDEV hdev
Definition: winddi.h:3449
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28
ULONG ulTechnology
Definition: ntgdityp.h:299
PLDEVOBJ NTAPI LDEVOBJ_pLoadDriver(_In_z_ LPWSTR pwszDriverName, _In_ ULONG ldevtype)
Definition: ldevobj.c:347
#define APIENTRY
Definition: api.h:79
PPDEVOBJ NTAPI EngpGetPDEV(_In_opt_ PUNICODE_STRING pustrDeviceName)
Definition: pdevobj.c:726
PPDEVOBJ NTAPI DbgLookupDHPDEV(DHPDEV dhpdev)
ULONG cDev
Definition: mdevobj.h:15
#define PLANES
Definition: wingdi.h:721
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define NT_ASSERT
Definition: rtlfuncs.h:3310
MDEVDISPLAY dev[0]
Definition: mdevobj.h:17