ReactOS  0.4.14-dev-1233-gf5658fd
ddraw.c File Reference
#include <win32k.h>
#include <debug.h>
Include dependency graph for ddraw.c:

Go to the source code of this file.

Macros

#define DXDBG   1
 

Functions

BOOL intEnableReactXDriver (HDC hdc)
 
NTSTATUS APIENTRY DxDdStartupDxGraphics (ULONG ulc1, PDRVENABLEDATA DxEngDrvOld, ULONG ulc2, PDRVENABLEDATA DxgDrvOld, PULONG DirectDrawContext, PEPROCESS Proc)
 
HANDLE APIENTRY NtGdiDdCreateDirectDrawObject (HDC hdc)
 
DWORD APIENTRY NtGdiDxgGenericThunk (ULONG_PTR ulIndex, ULONG_PTR ulHandle, SIZE_T *pdwSizeOfPtr1, PVOID pvPtr1, SIZE_T *pdwSizeOfPtr2, PVOID pvPtr2)
 
DWORD APIENTRY NtGdiDdGetDriverState (PDD_GETDRIVERSTATEDATA pdata)
 
DWORD APIENTRY NtGdiDdColorControl (HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)
 
HANDLE APIENTRY NtGdiDdCreateSurfaceObject (HANDLE hDirectDrawLocal, HANDLE hSurface, PDD_SURFACE_LOCAL puSurfaceLocal, PDD_SURFACE_MORE puSurfaceMore, PDD_SURFACE_GLOBAL puSurfaceGlobal, BOOL bComplete)
 
BOOL APIENTRY NtGdiDdDeleteDirectDrawObject (HANDLE hDirectDrawLocal)
 
BOOL APIENTRY NtGdiDdDeleteSurfaceObject (HANDLE hSurface)
 
BOOL APIENTRY NtGdiDdQueryDirectDrawObject (HANDLE hDirectDrawLocal, DD_HALINFO *pHalInfo, DWORD *pCallBackFlags, LPD3DNTHAL_CALLBACKS puD3dCallbacks, LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, LPDDSURFACEDESC puD3dTextureFormats, DWORD *puNumHeaps, VIDEOMEMORY *puvmList, DWORD *puNumFourCC, DWORD *puFourCC)
 
BOOL APIENTRY NtGdiDdReenableDirectDrawObject (HANDLE hDirectDrawLocal, BOOL *pubNewMode)
 
DWORD APIENTRY NtGdiDdGetDriverInfo (HANDLE hDirectDrawLocal, PDD_GETDRIVERINFODATA puGetDriverInfoData)
 
DWORD APIENTRY NtGdiDdGetAvailDriverMemory (HANDLE hDirectDrawLocal, PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)
 
DWORD APIENTRY NtGdiDdSetExclusiveMode (HANDLE hDirectDraw, PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData)
 
DWORD APIENTRY NtGdiDdFlipToGDISurface (HANDLE hDirectDraw, PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData)
 
HDC APIENTRY NtGdiDdGetDC (HANDLE hSurface, PALETTEENTRY *puColorTable)
 
HANDLE APIENTRY NtGdiDdGetDxHandle (HANDLE hDirectDraw, HANDLE hSurface, BOOL bRelease)
 
BOOL APIENTRY NtGdiDdReleaseDC (HANDLE hSurface)
 
BOOL APIENTRY NtGdiDdResetVisrgn (HANDLE hSurface, HWND hwnd)
 
BOOL APIENTRY NtGdiDdSetGammaRamp (HANDLE hDirectDraw, HDC hdc, LPVOID lpGammaRamp)
 

Variables

PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics = NULL
 
PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics = NULL
 
DRVFN gaEngFuncs []
 
ULONG gcEngFuncs
 
EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global
 
DRVFN gpDxFuncs [DXG_INDEX_DxDdIoctl+1]
 
HANDLE ghDxGraphics = NULL
 
ULONG gdwDirectDrawContext = 0
 

Macro Definition Documentation

◆ DXDBG

#define DXDBG   1

Definition at line 27 of file ddraw.c.

Function Documentation

◆ DxDdStartupDxGraphics()

NTSTATUS APIENTRY DxDdStartupDxGraphics ( ULONG  ulc1,
PDRVENABLEDATA  DxEngDrvOld,
ULONG  ulc2,
PDRVENABLEDATA  DxgDrvOld,
PULONG  DirectDrawContext,
PEPROCESS  Proc 
)

Definition at line 116 of file ddraw.c.

122 {
123  DRVENABLEDATA DxEngDrv;
124  DRVENABLEDATA DxgDrv;
125 
127 
128  /* FIXME: Setup of gaEngFuncs driver export list
129  * but not in this api, we can add it here tempary until we figout where
130  * no code have been writen for it yet
131  */
132 
133 
134  /* FIXME: ReactOS does not loading the dxapi.sys or import functions from it yet */
135  // DxApiGetVersion()
136 
137  /* Loading the kernel interface of DirectX for win32k */
138 
139  DPRINT1("Warning: trying loading xp/2003/windows7/reactos dxg.sys\n");
140  ghDxGraphics = EngLoadImage(L"\\SystemRoot\\System32\\drivers\\dxg.sys");
141  if ( ghDxGraphics == NULL)
142  {
144  DPRINT1("Warning: no ReactX or DirectX kernel driver found\n");
145  }
146  else
147  {
148  /* Import DxDdStartupDxGraphics and DxDdCleanupDxGraphics */
151 
152  if ((gpfnStartupDxGraphics) &&
154  {
155  /* Setup driver data for activate the dx interface */
157  DxEngDrv.pdrvfn = gaEngFuncs;
158  DxEngDrv.c = gcEngFuncs;
159 
161  &DxEngDrv,
162  sizeof(DRVENABLEDATA),
163  &DxgDrv,
165  Proc );
166  }
167 
168  /* Check if we manage loading the data and execute the dxStartupDxGraphics if it is successful */
169  if (!NT_SUCCESS(Status))
170  {
173  if (ghDxGraphics != NULL)
174  {
176  ghDxGraphics = NULL;
177  }
178  DPRINT1("Warning: DirectX graphics interface can not be initialized\n");
179  }
180  else
181  {
182  /* Sort the drv functions list in index order, this allows us doing, smaller optimize
183  * in API that are redirect to dx.sys
184  */
185 
186  PDRVFN lstDrvFN = DxgDrv.pdrvfn;
187  INT t;
188  for (t=0;t<=DXG_INDEX_DxDdIoctl;t++)
189  {
190  gpDxFuncs[lstDrvFN[t].iFunc].iFunc =lstDrvFN[t].iFunc;
191  gpDxFuncs[lstDrvFN[t].iFunc].pfn =lstDrvFN[t].pfn;
192  }
193 
194  DPRINT1("DirectX interface is activated\n");
195 
196  }
197  /* Return the status */
198  }
199 
200  return Status;
201 }
ULONG iFunc
Definition: winddi.h:530
LONG NTSTATUS
Definition: precomp.h:26
GLdouble GLdouble t
Definition: gl.h:2047
PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics
Definition: ddraw.c:15
int32_t INT
Definition: typedefs.h:57
PFN pfn
Definition: winddi.h:531
PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics
Definition: ddraw.c:14
HANDLE ghDxGraphics
Definition: ddraw.c:24
smooth NULL
Definition: ftsmooth.c:416
ULONG gdwDirectDrawContext
Definition: ddraw.c:25
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ENGAPI HANDLE APIENTRY EngLoadImage(_In_ LPWSTR pwszDriver)
Definition: ldevobj.c:456
DRVFN * pdrvfn
Definition: winddi.h:544
static const WCHAR L[]
Definition: oid.c:1250
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DDI_DRIVER_VERSION_NT5_01
Definition: winddi.h:538
Status
Definition: gdiplustypes.h:24
#define DXG_INDEX_DxDdIoctl
Definition: dxg.h:100
#define STATUS_DLL_NOT_FOUND
Definition: ntstatus.h:531
ENGAPI PVOID APIENTRY EngFindImageProcAddress(_In_ HANDLE hModule, _In_ LPSTR lpProcName)
Definition: ldevobj.c:497
ULONG iDriverVersion
Definition: winddi.h:542
#define STATUS_PROCEDURE_NOT_FOUND
Definition: ntstatus.h:344
#define DPRINT1
Definition: precomp.h:8
DRVFN gaEngFuncs[]
Definition: dxeng.c:15
ENGAPI VOID APIENTRY EngUnloadImage(_In_ HANDLE hModule)
Definition: ldevobj.c:465
Definition: winddi.h:529
ULONG gcEngFuncs
Definition: dxeng.c:14

Referenced by intEnableReactXDriver().

◆ intEnableReactXDriver()

BOOL intEnableReactXDriver ( HDC  hdc)

Definition at line 33 of file ddraw.c.

34 {
36  PEPROCESS Proc = NULL;
37  PDC pDC = NULL;
38  PPDEVOBJ pDev = NULL;
39  PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL;
40  BOOL success = FALSE;
41 
42  /* FIXME: Get the process data */
43 
44  /* Do not try load dxg.sys when it have already been load once */
46  {
48  if (!NT_SUCCESS(Status))
49  {
50  DPRINT1("Warning: Failed to create the directx interface\n");
51  return FALSE;
52  }
53  }
54 
55  pDC = DC_LockDc(hdc);
56  if (pDC == NULL)
57  {
58  DPRINT1("Warning: Failed to lock hdc\n");
59  return FALSE;
60  }
61 
62  pDev = pDC->ppdev;
63 
64  /* Test and see if drv got a DX interface or not */
65  if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
67  {
68  DPRINT1("Warning : DisableDirectDraw and EnableDirectDraw are NULL, no dx driver \n");
69  }
70  else
71  {
72 
73  /* Check and see if DX has been enabled or not */
74  if ( pDev->pEDDgpl->pvmList == NULL)
75  {
76  pDev->pEDDgpl->ddCallbacks.dwSize = sizeof(DD_CALLBACKS);
77  pDev->pEDDgpl->ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS);
78  pDev->pEDDgpl->ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
79 
81  if (pfnDdEnableDirectDraw == NULL)
82  {
83  DPRINT1("Warning: no pfnDdEnableDirectDraw\n");
84  }
85  else
86  {
87  DPRINT1(" call to pfnDdEnableDirectDraw \n ");
88 
89  /* Note: it is the hdev struct it wants, not the drv hPDev aka pdc->PDev */
90  success = pfnDdEnableDirectDraw(pDC->ppdev, TRUE);
91  }
92  }
93  else
94  {
95  DPRINT1(" The dxg.sys and graphic card driver interface is enabled \n ");
96  success = TRUE;
97  }
98  }
99 
100 
101  DPRINT1("Return value : 0x%08x\n",success);
102  DC_UnlockDc(pDC);
103  DPRINT1(" end call to pfnDdEnableDirectDraw \n ");
104  return success;
105 }
#define DXG_INDEX_DxDdEnableDirectDraw
Definition: dxg.h:107
#define TRUE
Definition: types.h:120
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN(NTAPI * PGD_DXDDENABLEDIRECTDRAW)(PVOID, BOOLEAN)
Definition: dxg.h:199
struct DD_CALLBACKS DD_CALLBACKS
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:138
struct DD_PALETTECALLBACKS DD_PALETTECALLBACKS
unsigned int BOOL
Definition: ntddk_ex.h:94
PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics
Definition: ddraw.c:14
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG ulc1, PDRVENABLEDATA DxEngDrvOld, ULONG ulc2, PDRVENABLEDATA DxgDrvOld, PULONG DirectDrawContext, PEPROCESS Proc)
Definition: ddraw.c:116
Definition: polytest.cpp:40
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define success(from, fromstr, to, tostr)
HDC hdc
Definition: main.c:9
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
PFN_DrvDisableDirectDraw DisableDirectDraw
Definition: ntgdityp.h:629
struct DD_SURFACECALLBACKS DD_SURFACECALLBACKS
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:150
Status
Definition: gdiplustypes.h:24
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
#define DPRINT1
Definition: precomp.h:8
PFN_DrvEnableDirectDraw EnableDirectDraw
Definition: ntgdityp.h:628

Referenced by NtGdiDdCreateDirectDrawObject().

◆ NtGdiDdColorControl()

DWORD APIENTRY NtGdiDdColorControl ( HANDLE  hSurface,
PDD_COLORCONTROLDATA  puColorControlData 
)

Definition at line 321 of file ddraw.c.

323 {
325 
326  if (pfnDdColorControl == NULL)
327  {
328  DPRINT1("Warning: no pfnDdColorControl\n");
330  }
331 
332  DPRINT1("Calling dxg.sys DdColorControl\n");
333  return pfnDdColorControl(hSurface,puColorControlData);
334 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DXG_INDEX_DxDdColorControl
Definition: dxg.h:24
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
DWORD(APIENTRY * PGD_DDCOLORCONTROL)(HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)
Definition: intddraw.h:27

◆ NtGdiDdCreateDirectDrawObject()

HANDLE APIENTRY NtGdiDdCreateDirectDrawObject ( HDC  hdc)

Definition at line 212 of file ddraw.c.

213 {
214  PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject;
215 
216  if (hdc == NULL)
217  {
218  DPRINT1("Warning: hdc is NULL\n");
219  return 0;
220  }
221 
222  /* FIXME: This should be alloc for each drv and use it from each drv, not global for whole win32k */
224  {
225  DPRINT1("Warning: Failed to start the DirectX interface from the graphic driver\n");
227  }
228 
229  /* Get the pfnDdCreateDirectDrawObject after we load the drv */
231 
232  if (pfnDdCreateDirectDrawObject == NULL)
233  {
234  DPRINT1("Warning: no pfnDdCreateDirectDrawObject\n");
236  }
237 
238  DPRINT1("Calling dxg.sys DdCreateDirectDrawObject\n");
239 
240  return pfnDdCreateDirectDrawObject(hdc);
241 }
HANDLE(APIENTRY * PGD_DDCREATEDIRECTDRAWOBJECT)(HDC hdc)
Definition: intddraw.h:25
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
BOOL intEnableReactXDriver(HDC hdc)
Definition: ddraw.c:33
#define DXG_INDEX_DxDdCreateDirectDrawObject
Definition: dxg.h:25
smooth NULL
Definition: ftsmooth.c:416
HDC hdc
Definition: main.c:9
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDdCreateSurfaceObject()

HANDLE APIENTRY NtGdiDdCreateSurfaceObject ( HANDLE  hDirectDrawLocal,
HANDLE  hSurface,
PDD_SURFACE_LOCAL  puSurfaceLocal,
PDD_SURFACE_MORE  puSurfaceMore,
PDD_SURFACE_GLOBAL  puSurfaceGlobal,
BOOL  bComplete 
)

Definition at line 341 of file ddraw.c.

348 {
350 
351  if (pfnDdCreateSurfaceObject == NULL)
352  {
353  DPRINT1("Warning: no pfnDdCreateSurfaceObject\n");
355  }
356 
357  DPRINT1("Calling dxg.sys pfnDdCreateSurfaceObject\n");
358  return pfnDdCreateSurfaceObject(hDirectDrawLocal, hSurface, puSurfaceLocal, puSurfaceMore, puSurfaceGlobal, bComplete);
359 }
#define DXG_INDEX_DxDdCreateSurfaceObject
Definition: dxg.h:30
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
HANDLE(APIENTRY * PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL)
Definition: intddraw.h:28

◆ NtGdiDdDeleteDirectDrawObject()

BOOL APIENTRY NtGdiDdDeleteDirectDrawObject ( HANDLE  hDirectDrawLocal)

Definition at line 366 of file ddraw.c.

367 {
369 
370  if (pfnDdDeleteDirectDrawObject == NULL)
371  {
372  DPRINT1("Warning: no pfnDdDeleteDirectDrawObject\n");
373  return FALSE;
374  }
375 
376  if (hDirectDrawLocal == NULL)
377  {
378  DPRINT1("Warning: hDirectDrawLocal is NULL\n");
379  return FALSE;
380  }
381 
382  DPRINT1("hDirectDrawLocal = %p \n", hDirectDrawLocal);
383  DPRINT1("Calling dxg.sys pfnDdDeleteDirectDrawObject\n");
384 
385  return pfnDdDeleteDirectDrawObject(hDirectDrawLocal);
386 }
BOOL(APIENTRY * PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE)
Definition: intddraw.h:29
#define DXG_INDEX_DxDdDeleteDirectDrawObject
Definition: dxg.h:31
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDdDeleteSurfaceObject()

BOOL APIENTRY NtGdiDdDeleteSurfaceObject ( HANDLE  hSurface)

Definition at line 393 of file ddraw.c.

394 {
396 
397  if (pfnDdDeleteSurfaceObject == NULL)
398  {
399  DPRINT1("Warning: no pfnDdDeleteSurfaceObject\n");
401  }
402  /* Try and see if the handle is valid */
403 
404  DPRINT1("Calling dxg.sys DdDeleteSurfaceObject\n");
405  return pfnDdDeleteSurfaceObject(hSurface);
406 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
BOOL(APIENTRY * PGD_DXDDDELETESURFACEOBJECT)(HANDLE)
Definition: intddraw.h:30
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
#define DXG_INDEX_DxDdDeleteSurfaceObject
Definition: dxg.h:32

◆ NtGdiDdFlipToGDISurface()

DWORD APIENTRY NtGdiDdFlipToGDISurface ( HANDLE  hDirectDraw,
PDD_FLIPTOGDISURFACEDATA  puFlipToGDISurfaceData 
)

Definition at line 545 of file ddraw.c.

547 {
549 
550  if (pfnDdFlipToGDISurface == NULL)
551  {
552  DPRINT1("Warning: no pfnDdFlipToGDISurface\n");
554  }
555 
556  DPRINT1("Calling dxg.sys pfnDdFlipToGDISurface\n");
557  return pfnDdFlipToGDISurface(hDirectDraw, puFlipToGDISurfaceData);
558 
559 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
#define DXG_INDEX_DxDdFlipToGDISurface
Definition: dxg.h:38
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
DWORD(APIENTRY * PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA)
Definition: intddraw.h:31
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDdGetAvailDriverMemory()

DWORD APIENTRY NtGdiDdGetAvailDriverMemory ( HANDLE  hDirectDrawLocal,
PDD_GETAVAILDRIVERMEMORYDATA  puGetAvailDriverMemoryData 
)

Definition at line 501 of file ddraw.c.

503 {
505 
506  if (pfnDdGetAvailDriverMemory == NULL)
507  {
508  DPRINT1("Warning: no pfnDdGetAvailDriverMemory\n");
510  }
511 
512  DPRINT1("Calling dxg.sys pfnDdGetAvailDriverMemory\n");
513  return pfnDdGetAvailDriverMemory(hDirectDrawLocal, puGetAvailDriverMemoryData);
514 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DXG_INDEX_DxDdGetAvailDriverMemory
Definition: dxg.h:39
#define DPRINT1
Definition: precomp.h:8
DWORD(APIENTRY * PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE, PDD_GETAVAILDRIVERMEMORYDATA)
Definition: intddraw.h:32

◆ NtGdiDdGetDC()

HDC APIENTRY NtGdiDdGetDC ( HANDLE  hSurface,
PALETTEENTRY puColorTable 
)

Definition at line 566 of file ddraw.c.

568 {
570 
571  if (pfnDdGetDC == NULL)
572  {
573  DPRINT1("Warning: no pfnDdGetDC\n");
575  }
576 
577  DPRINT1("Calling dxg.sys pfnDdGetDC\n");
578  return pfnDdGetDC(hSurface, puColorTable);
579 }
#define DXG_INDEX_DxDdGetDC
Definition: dxg.h:41
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
HDC(APIENTRY * PGD_DDGETDC)(HANDLE, PALETTEENTRY *)
Definition: intddraw.h:19
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDdGetDriverInfo()

DWORD APIENTRY NtGdiDdGetDriverInfo ( HANDLE  hDirectDrawLocal,
PDD_GETDRIVERINFODATA  puGetDriverInfoData 
)

Definition at line 479 of file ddraw.c.

482 {
484 
485  if (pfnDdGetDriverInfo == NULL)
486  {
487  DPRINT1("Warning: no pfnDdGetDriverInfo\n");
489  }
490 
491  DPRINT1("Calling dxg.sys pfnDdGetDriverInfo\n");
492  return pfnDdGetDriverInfo(hDirectDrawLocal, puGetDriverInfoData);
493 }
DWORD(APIENTRY * PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA)
Definition: intddraw.h:21
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DXG_INDEX_DxDdGetDriverInfo
Definition: dxg.h:42
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDdGetDriverState()

DWORD APIENTRY NtGdiDdGetDriverState ( PDD_GETDRIVERSTATEDATA  pdata)

Definition at line 302 of file ddraw.c.

303 {
305 
306  if (pfnDdGetDriverState == NULL)
307  {
308  DPRINT1("Warning: no pfnDdGetDriverState\n");
310  }
311 
312  DPRINT1("Calling dxg.sys DdGetDriverState\n");
313  return pfnDdGetDriverState(pdata);
314 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DXG_INDEX_DxDdGetDriverState
Definition: dxg.h:16
smooth NULL
Definition: ftsmooth.c:416
static PROTOCOLDATA * pdata
Definition: protocol.c:158
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
DWORD(APIENTRY * PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA)
Definition: intddraw.h:26

◆ NtGdiDdGetDxHandle()

HANDLE APIENTRY NtGdiDdGetDxHandle ( HANDLE  hDirectDraw,
HANDLE  hSurface,
BOOL  bRelease 
)

Definition at line 586 of file ddraw.c.

589 {
591 
592  if (pfnDdGetDxHandle == NULL)
593  {
594  DPRINT1("Warning: no pfnDdGetDxHandle\n");
596  }
597 
598  DPRINT1("Calling dxg.sys pfnDdGetDxHandle\n");
599  return pfnDdGetDxHandle(hDirectDraw, hSurface, bRelease);
600 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
#define DXG_INDEX_DxDdGetDxHandle
Definition: dxg.h:43
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
HANDLE(APIENTRY * PGD_DDGETDXHANDLE)(HANDLE, HANDLE, BOOL)
Definition: intddraw.h:18

◆ NtGdiDdQueryDirectDrawObject()

BOOL APIENTRY NtGdiDdQueryDirectDrawObject ( HANDLE  hDirectDrawLocal,
DD_HALINFO pHalInfo,
DWORD pCallBackFlags,
LPD3DNTHAL_CALLBACKS  puD3dCallbacks,
LPD3DNTHAL_GLOBALDRIVERDATA  puD3dDriverData,
PDD_D3DBUFCALLBACKS  puD3dBufferCallbacks,
LPDDSURFACEDESC  puD3dTextureFormats,
DWORD puNumHeaps,
VIDEOMEMORY puvmList,
DWORD puNumFourCC,
DWORD puFourCC 
)

Definition at line 413 of file ddraw.c.

424 {
426 
427  if (pfnDdQueryDirectDrawObject == NULL)
428  {
429  DPRINT1("Warning: no pfnDdQueryDirectDrawObject\n");
431  }
432 
433  DPRINT1("Calling dxg.sys pfnDdQueryDirectDrawObject\n");
434 
435 
436  return pfnDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData,
437  puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, puvmList, puNumFourCC, puFourCC);
438 
439 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
_Out_ DD_HALINFO * pHalInfo
Definition: winddi.h:4226
BOOL(APIENTRY * PGD_DXDDQUERYDIRECTDRAWOBJECT)(HANDLE, DD_HALINFO *, DWORD *, LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA, PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *)
Definition: intddraw.h:33
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
#define DXG_INDEX_DxDdQueryDirectDrawObject
Definition: dxg.h:53

◆ NtGdiDdReenableDirectDrawObject()

BOOL APIENTRY NtGdiDdReenableDirectDrawObject ( HANDLE  hDirectDrawLocal,
BOOL pubNewMode 
)

Definition at line 447 of file ddraw.c.

449 {
450 #if DXDBG
451  BOOL status = FALSE;
452 #endif
454 
455  if (pfnDdReenableDirectDrawObject == NULL)
456  {
457  DPRINT1("Warning: no pfnDdReenableDirectDrawObject\n");
459  }
460 
461  DPRINT1("Calling dxg.sys pfnDdReenableDirectDrawObject\n");
462 
463 #if DXDBG
464  status = pfnDdReenableDirectDrawObject(hDirectDrawLocal, pubNewMode);
465  DPRINT1("end Calling dxg.sys pfnDdReenableDirectDrawObject\n");
466  DPRINT1("return value : 0x%08x\n", status);
467  return status;
468 #else
469  return pfnDdReenableDirectDrawObject(hDirectDrawLocal, pubNewMode);
470 #endif
471 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
DWORD(APIENTRY * PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL *)
Definition: intddraw.h:20
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
#define DXG_INDEX_DxDdReenableDirectDrawObject
Definition: dxg.h:55
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ NtGdiDdReleaseDC()

BOOL APIENTRY NtGdiDdReleaseDC ( HANDLE  hSurface)

Definition at line 608 of file ddraw.c.

609 {
611 
612  if (pfnDdReleaseDC == NULL)
613  {
614  DPRINT1("Warning: no pfnDdReleaseDC\n");
616  }
617 
618  DPRINT1("Calling dxg.sys pfnDdReleaseDC\n");
619  return pfnDdReleaseDC(hSurface);
620 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DXG_INDEX_DxDdReleaseDC
Definition: dxg.h:56
#define DPRINT1
Definition: precomp.h:8
BOOL(APIENTRY * PGD_DDRELEASEDC)(HANDLE)
Definition: intddraw.h:16

◆ NtGdiDdResetVisrgn()

BOOL APIENTRY NtGdiDdResetVisrgn ( HANDLE  hSurface,
HWND  hwnd 
)

Definition at line 627 of file ddraw.c.

629 {
630 
632 
633  if (pfnDdResetVisrgn == NULL)
634  {
635  DPRINT1("Warning: no pfnDdResetVisrgn\n");
637  }
638 
639  DPRINT1("Calling dxg.sys pfnDdResetVisrgn\n");
640  return pfnDdResetVisrgn(hSurface, hwnd);
641 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DXG_INDEX_DxDdResetVisrgn
Definition: dxg.h:58
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8
BOOL(APIENTRY * PGD_DDRESTVISRGN)(HANDLE, HWND)
Definition: intddraw.h:17

◆ NtGdiDdSetExclusiveMode()

DWORD APIENTRY NtGdiDdSetExclusiveMode ( HANDLE  hDirectDraw,
PDD_SETEXCLUSIVEMODEDATA  puSetExclusiveModeData 
)

Definition at line 523 of file ddraw.c.

525 {
527 
528  if (pfnDdSetExclusiveMode == NULL)
529  {
530  DPRINT1("Warning: no pfnDdSetExclusiveMode\n");
532  }
533 
534  DPRINT1("Calling dxg.sys pfnDdSetExclusiveMode\n");
535  return pfnDdSetExclusiveMode(hDirectDraw, puSetExclusiveModeData);
536 
537 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
DWORD(APIENTRY * PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA)
Definition: intddraw.h:22
#define DPRINT1
Definition: precomp.h:8
#define DXG_INDEX_DxDdSetExclusiveMode
Definition: dxg.h:60

◆ NtGdiDdSetGammaRamp()

BOOL APIENTRY NtGdiDdSetGammaRamp ( HANDLE  hDirectDraw,
HDC  hdc,
LPVOID  lpGammaRamp 
)

Definition at line 648 of file ddraw.c.

651 {
653 
654  if (pfnDdSetGammaRamp == NULL)
655  {
656  DPRINT1("Warning: no pfnDdSetGammaRamp\n");
658  }
659 
660  DPRINT1("Calling dxg.sys pfnDdSetGammaRamp\n");
661  return pfnDdSetGammaRamp(hDirectDraw, hdc, lpGammaRamp);
662 }
#define DXG_INDEX_DxDdSetGammaRamp
Definition: dxg.h:61
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
BOOL(APIENTRY * PGD_DDSETGAMMARAMP)(HANDLE, HDC, LPVOID)
Definition: intddraw.h:15
smooth NULL
Definition: ftsmooth.c:416
HDC hdc
Definition: main.c:9
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DPRINT1
Definition: precomp.h:8

◆ NtGdiDxgGenericThunk()

DWORD APIENTRY NtGdiDxgGenericThunk ( ULONG_PTR  ulIndex,
ULONG_PTR  ulHandle,
SIZE_T pdwSizeOfPtr1,
PVOID  pvPtr1,
SIZE_T pdwSizeOfPtr2,
PVOID  pvPtr2 
)

Definition at line 278 of file ddraw.c.

284 {
286 
287  if (pfnDxgGenericThunk == NULL)
288  {
289  DPRINT1("Warning: no pfnDxgGenericThunk\n");
291  }
292 
293  DPRINT1("Calling dxg.sys pfnDxgGenericThunk\n");
294  return pfnDxgGenericThunk(ulIndex, ulHandle, pdwSizeOfPtr1, pvPtr1, pdwSizeOfPtr2, pvPtr2);
295 }
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
smooth NULL
Definition: ftsmooth.c:416
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
#define DXG_INDEX_DxDxgGenericThunk
Definition: dxg.h:10
ULONG ulIndex
Definition: symbols.c:92
DWORD(NTAPI * PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T *, PVOID, SIZE_T *, PVOID)
Definition: dxg.h:123
#define DPRINT1
Definition: precomp.h:8

Variable Documentation

◆ edd_DdirectDraw_Global

EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global

◆ gaEngFuncs

DRVFN gaEngFuncs[]

Definition at line 15 of file dxeng.c.

Referenced by DxDdStartupDxGraphics().

◆ gcEngFuncs

ULONG gcEngFuncs

Definition at line 14 of file dxeng.c.

Referenced by DxDdStartupDxGraphics().

◆ gdwDirectDrawContext

ULONG gdwDirectDrawContext = 0

Definition at line 25 of file ddraw.c.

Referenced by DxDdStartupDxGraphics().

◆ ghDxGraphics

HANDLE ghDxGraphics = NULL

Definition at line 24 of file ddraw.c.

Referenced by DxDdStartupDxGraphics().

◆ gpDxFuncs

DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]

Definition at line 23 of file ddraw.c.

Referenced by _Ret_opt_bytecount_(), DxDdStartupDxGraphics(), EngDxIoctl(), EngFreePrivateUserMem(), EngLockDirectDrawSurface(), EngUnlockDirectDrawSurface(), HeapVidMemAllocAligned(), intEnableReactXDriver(), NtGdiD3dContextCreate(), NtGdiD3dContextDestroy(), NtGdiD3dContextDestroyAll(), NtGdiD3dDrawPrimitives2(), NtGdiD3dValidateTextureStageState(), NtGdiDdAddAttachedSurface(), NtGdiDdAlphaBlt(), NtGdiDdAttachSurface(), NtGdiDdBeginMoCompFrame(), NtGdiDdBlt(), NtGdiDdCanCreateD3DBuffer(), NtGdiDdCanCreateSurface(), NtGdiDdColorControl(), NtGdiDdCreateD3DBuffer(), NtGdiDdCreateDirectDrawObject(), NtGdiDdCreateMoComp(), NtGdiDdCreateSurface(), NtGdiDdCreateSurfaceEx(), NtGdiDdCreateSurfaceObject(), NtGdiDdDeleteDirectDrawObject(), NtGdiDdDeleteSurfaceObject(), NtGdiDdDestroyD3DBuffer(), NtGdiDdDestroyMoComp(), NtGdiDdDestroySurface(), NtGdiDdEndMoCompFrame(), NtGdiDdFlip(), NtGdiDdFlipToGDISurface(), NtGdiDdGetAvailDriverMemory(), NtGdiDdGetBltStatus(), NtGdiDdGetDC(), NtGdiDdGetDriverInfo(), NtGdiDdGetDriverState(), NtGdiDdGetDxHandle(), NtGdiDdGetFlipStatus(), NtGdiDdGetInternalMoCompInfo(), NtGdiDdGetMoCompBuffInfo(), NtGdiDdGetMoCompFormats(), NtGdiDdGetMoCompGuids(), NtGdiDdGetScanLine(), NtGdiDdLock(), NtGdiDdLockD3D(), NtGdiDdQueryDirectDrawObject(), NtGdiDdQueryMoCompStatus(), NtGdiDdReenableDirectDrawObject(), NtGdiDdReleaseDC(), NtGdiDdRenderMoComp(), NtGdiDdResetVisrgn(), NtGdiDdSetColorKey(), NtGdiDdSetExclusiveMode(), NtGdiDdSetGammaRamp(), NtGdiDdSetOverlayPosition(), NtGdiDdUnattachSurface(), NtGdiDdUnlock(), NtGdiDdUnlockD3D(), NtGdiDdUpdateOverlay(), NtGdiDdWaitForVerticalBlank(), NtGdiDvpAcquireNotification(), NtGdiDvpCanCreateVideoPort(), NtGdiDvpColorControl(), NtGdiDvpCreateVideoPort(), NtGdiDvpDestroyVideoPort(), NtGdiDvpFlipVideoPort(), NtGdiDvpGetVideoPortBandwidth(), NtGdiDvpGetVideoPortConnectInfo(), NtGdiDvpGetVideoPortField(), NtGdiDvpGetVideoPortFlipStatus(), NtGdiDvpGetVideoPortInputFormats(), NtGdiDvpGetVideoPortLine(), NtGdiDvpGetVideoPortOutputFormats(), NtGdiDvpGetVideoSignalStatus(), NtGdiDvpReleaseNotification(), NtGdiDvpUpdateVideoPort(), NtGdiDvpWaitForVideoPortSync(), NtGdiDxgGenericThunk(), and VidMemFree().

◆ gpfnCleanupDxGraphics

PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics = NULL

Definition at line 15 of file ddraw.c.

Referenced by DxDdStartupDxGraphics().

◆ gpfnStartupDxGraphics

PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics = NULL

Definition at line 14 of file ddraw.c.

Referenced by DxDdStartupDxGraphics(), and intEnableReactXDriver().