ReactOS  0.4.14-dev-317-g96040ec
gdientry.c File Reference
#include <precomp.h>
#include <stdio.h>
#include <d3dhal.h>
Include dependency graph for gdientry.c:

Go to the source code of this file.

Macros

#define GetDdHandle(Handle)   ((HANDLE)Handle ? (HANDLE)Handle : ghDirectDraw)
 

Functions

DWORD WINAPI DdAddAttachedSurface (LPDDHAL_ADDATTACHEDSURFACEDATA Attach)
 
DWORD WINAPI DdBlt (LPDDHAL_BLTDATA Blt)
 
DWORD WINAPI DdDestroySurface (LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
 
DWORD WINAPI DdFlip (LPDDHAL_FLIPDATA Flip)
 
DWORD WINAPI DdLock (LPDDHAL_LOCKDATA Lock)
 
DWORD WINAPI DdUnlock (LPDDHAL_UNLOCKDATA Unlock)
 
DWORD WINAPI DdGetBltStatus (LPDDHAL_GETBLTSTATUSDATA GetBltStatus)
 
DWORD WINAPI DdGetFlipStatus (LPDDHAL_GETFLIPSTATUSDATA GetFlipStatus)
 
DWORD WINAPI DdUpdateOverlay (LPDDHAL_UPDATEOVERLAYDATA UpdateOverlay)
 
DWORD WINAPI DdSetOverlayPosition (LPDDHAL_SETOVERLAYPOSITIONDATA SetOverlayPosition)
 
DWORD WINAPI DdWaitForVerticalBlank (LPDDHAL_WAITFORVERTICALBLANKDATA WaitForVerticalBlank)
 
DWORD WINAPI DdCanCreateSurface (LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
 
DWORD WINAPI DdCreateSurface (LPDDHAL_CREATESURFACEDATA pCreateSurface)
 
DWORD WINAPI DdSetColorKey (LPDDHAL_SETCOLORKEYDATA pSetColorKey)
 
DWORD WINAPI DdGetScanLine (LPDDHAL_GETSCANLINEDATA pGetScanLine)
 
BOOL WINAPI DvpCreateVideoPort (LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
 
DWORD WINAPI DvpDestroyVideoPort (LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
 
DWORD WINAPI DvpFlipVideoPort (LPDDHAL_FLIPVPORTDATA pDvdPortFlip)
 
DWORD WINAPI DvpGetVideoPortBandwidth (LPDDHAL_GETVPORTBANDWIDTHDATA pDvdPortBandWidth)
 
DWORD WINAPI DvpColorControl (LPDDHAL_VPORTCOLORDATA pDvdPortColorControl)
 
DWORD WINAPI DvpGetVideoSignalStatus (LPDDHAL_GETVPORTSIGNALDATA pDvdPortVideoSignalStatus)
 
DWORD WINAPI DvpGetVideoPortFlipStatus (LPDDHAL_GETVPORTFLIPSTATUSDATA pDvdPortVideoPortFlipStatus)
 
DWORD WINAPI DvpCanCreateVideoPort (LPDDHAL_CANCREATEVPORTDATA pDvdCanCreateVideoPort)
 
DWORD WINAPI DvpWaitForVideoPortSync (LPDDHAL_WAITFORVPORTSYNCDATA pDvdWaitForVideoPortSync)
 
DWORD WINAPI DvpUpdateVideoPort (LPDDHAL_UPDATEVPORTDATA pDvdUpdateVideoPort)
 
DWORD WINAPI DvpGetVideoPortField (LPDDHAL_FLIPVPORTDATA pDvdGetVideoPortField)
 
DWORD WINAPI DvpGetVideoPortInputFormats (LPDDHAL_GETVPORTINPUTFORMATDATA pDvdGetVideoPortInputFormat)
 
DWORD WINAPI DvpGetVideoPortLine (LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortLine)
 
DWORD WINAPI DvpGetVideoPortOutputFormats (LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortOutputFormat)
 
DWORD WINAPI DvpGetVideoPortConnectInfo (LPDDHAL_GETVPORTCONNECTDATA pDvdGetVideoPortInfo)
 
DWORD WINAPI DdGetAvailDriverMemory (LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverMemory)
 
DWORD WINAPI DdAlphaBlt (LPDDHAL_BLTDATA pDdAlphaBlt)
 
DWORD WINAPI DdCreateSurfaceEx (LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx)
 
DWORD WINAPI DdColorControl (LPDDHAL_COLORCONTROLDATA pDdColorControl)
 
DWORD WINAPI DdSetExclusiveMode (LPDDHAL_SETEXCLUSIVEMODEDATA pDdSetExclusiveMode)
 
DWORD WINAPI DdFlipToGDISurface (LPDDHAL_FLIPTOGDISURFACEDATA pDdFlipToGDISurface)
 
DWORD WINAPI DdGetDriverInfo (LPDDHAL_GETDRIVERINFODATA pData)
 
BOOL WINAPI D3dContextCreate (LPD3DHAL_CONTEXTCREATEDATA pdcci)
 
DWORD WINAPI DdCanCreateD3DBuffer (LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
 
DWORD WINAPI DdCreateD3DBuffer (LPDDHAL_CREATESURFACEDATA pCreateSurface)
 
DWORD WINAPI DdDestroyD3DBuffer (LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
 
DWORD WINAPI DdLockD3D (LPDDHAL_LOCKDATA Lock)
 
DWORD WINAPI DdUnlockD3D (LPDDHAL_UNLOCKDATA Unlock)
 
BOOL WINAPI bDDCreateSurface (LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
 
BOOL WINAPI DdCreateDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, HDC hdc)
 
BOOL WINAPI DdQueryDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, LPDDHALINFO pHalInfo, LPDDHAL_DDCALLBACKS pDDCallbacks, LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks, LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks, LPD3DHAL_CALLBACKS pD3dCallbacks, LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData, LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks, LPDDSURFACEDESC pD3dTextureFormats, LPDWORD pdwFourCC, LPVIDMEM pvmList)
 
BOOL WINAPI DdDeleteDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal)
 
BOOL WINAPI DdCreateSurfaceObject (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, BOOL bPrimarySurface)
 
BOOL WINAPI DdDeleteSurfaceObject (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
 
BOOL WINAPI DdResetVisrgn (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, HWND hWnd)
 
HDC WINAPI DdGetDC (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, LPPALETTEENTRY pColorTable)
 
BOOL WINAPI DdReleaseDC (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
 
HBITMAP WINAPI DdCreateDIBSection (HDC hdc, CONST BITMAPINFO *pbmi, UINT iUsage, VOID **ppvBits, HANDLE hSectionApp, DWORD dwOffset)
 
BOOL WINAPI DdReenableDirectDrawObject (LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, BOOL *pbNewMode)
 
BOOL WINAPI DdAttachSurface (LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
 
VOID WINAPI DdUnattachSurface (LPDDRAWI_DDRAWSURFACE_LCL pSurface, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached)
 
ULONG WINAPI DdQueryDisplaySettingsUniqueness (VOID)
 
HANDLE WINAPI DdGetDxHandle (LPDDRAWI_DIRECTDRAW_LCL pDDraw, LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bRelease)
 
BOOL WINAPI DdSetGammaRamp (LPDDRAWI_DIRECTDRAW_LCL pDDraw, HDC hdc, LPVOID lpGammaRamp)
 

Variables

HANDLE ghDirectDraw
 
ULONG gcDirectDraw
 

Macro Definition Documentation

◆ GetDdHandle

#define GetDdHandle (   Handle)    ((HANDLE)Handle ? (HANDLE)Handle : ghDirectDraw)

Definition at line 22 of file gdientry.c.

Function Documentation

◆ bDDCreateSurface()

BOOL WINAPI bDDCreateSurface ( LPDDRAWI_DDRAWSURFACE_LCL  pSurface,
BOOL  bComplete 
)

Definition at line 1392 of file gdientry.c.

1394 {
1395  DD_SURFACE_LOCAL SurfaceLocal;
1396  DD_SURFACE_GLOBAL SurfaceGlobal;
1397  DD_SURFACE_MORE SurfaceMore;
1398 
1399  /* Zero struct */
1400  RtlZeroMemory(&SurfaceLocal, sizeof(DD_SURFACE_LOCAL));
1401  RtlZeroMemory(&SurfaceGlobal, sizeof(DD_SURFACE_GLOBAL));
1402  RtlZeroMemory(&SurfaceMore, sizeof(DD_SURFACE_MORE));
1403 
1404  /* Set up SurfaceLocal struct */
1405  SurfaceLocal.ddsCaps.dwCaps = pSurface->ddsCaps.dwCaps;
1406  SurfaceLocal.dwFlags = pSurface->dwFlags;
1407 
1408  /* Set up SurfaceMore struct */
1409  RtlMoveMemory(&SurfaceMore.ddsCapsEx,
1410  &pSurface->ddckCKDestBlt,
1411  sizeof(DDSCAPSEX));
1412  SurfaceMore.dwSurfaceHandle = pSurface->lpSurfMore->dwSurfaceHandle;
1413 
1414  /* Set up SurfaceGlobal struct */
1415  SurfaceGlobal.fpVidMem = pSurface->lpGbl->fpVidMem;
1416  SurfaceGlobal.dwLinearSize = pSurface->lpGbl->dwLinearSize;
1417  SurfaceGlobal.wHeight = pSurface->lpGbl->wHeight;
1418  SurfaceGlobal.wWidth = pSurface->lpGbl->wWidth;
1419 
1420  /* Check if we have a pixel format */
1421  if (pSurface->dwFlags & DDSD_PIXELFORMAT)
1422  {
1423  /* Use global one */
1424  SurfaceGlobal.ddpfSurface = pSurface->lpGbl->lpDD->vmiData.ddpfDisplay;
1425  SurfaceGlobal.ddpfSurface.dwSize = sizeof(DDPIXELFORMAT);
1426  }
1427  else
1428  {
1429  /* Use local one */
1430  SurfaceGlobal.ddpfSurface = pSurface->lpGbl->lpDD->vmiData.ddpfDisplay;
1431  }
1432 
1433  /* Create the object */
1434  pSurface->hDDSurface = (DWORD_PTR)NtGdiDdCreateSurfaceObject(GetDdHandle(pSurface->lpGbl->lpDD->hDD),
1435  (HANDLE)pSurface->hDDSurface,
1436  &SurfaceLocal,
1437  &SurfaceMore,
1438  &SurfaceGlobal,
1439  bComplete);
1440 
1441  /* Return status */
1442  if (pSurface->hDDSurface) return TRUE;
1443  return FALSE;
1444 }
#define TRUE
Definition: types.h:120
DWORD dwSurfaceHandle
Definition: ddrawint.h:166
#define DWORD_PTR
Definition: treelist.c:76
DDSCAPSEX ddsCapsEx
Definition: ddrawint.h:165
DWORD dwCaps
Definition: ddraw.h:727
DDSCAPS ddsCaps
Definition: ddrawint.h:174
#define GetDdHandle(Handle)
Definition: gdientry.c:22
struct _DDPIXELFORMAT DDPIXELFORMAT
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
PVOID HANDLE
Definition: typedefs.h:71
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateSurfaceObject(_In_ HANDLE hDirectDrawLocal, _In_ HANDLE hSurface, _In_ PDD_SURFACE_LOCAL puSurfaceLocal, _In_ PDD_SURFACE_MORE puSurfaceMore, _In_ PDD_SURFACE_GLOBAL puSurfaceGlobal, _In_ BOOL bComplete)
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
DDPIXELFORMAT ddpfSurface
Definition: ddrawint.h:156
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
FLATPTR fpVidMem
Definition: ddrawint.h:146
DWORD dwSize
Definition: ddraw.h:1070

Referenced by DdAttachSurface(), and DdCreateSurfaceObject().

◆ D3dContextCreate()

BOOL WINAPI D3dContextCreate ( LPD3DHAL_CONTEXTCREATEDATA  pdcci)

Definition at line 1234 of file gdientry.c.

1235 {
1236  HANDLE hSurfZ = NULL;
1237 
1238  if (pdcci->lpDDSZLcl)
1239  {
1240  hSurfZ = (HANDLE)pdcci->lpDDSZLcl->hDDSurface;
1241  }
1242 
1243  return NtGdiD3dContextCreate(GetDdHandle(pdcci->lpDDLcl->hDD),
1244  (HANDLE)pdcci->lpDDSLcl->hDDSurface,
1245  hSurfZ,
1246  (D3DNTHAL_CONTEXTCREATEI *)pdcci);
1247 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSZLcl
Definition: d3dhal.h:245
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: d3dhal.h:237
#define GetDdHandle(Handle)
Definition: gdientry.c:22
smooth NULL
Definition: ftsmooth.c:416
__kernel_entry W32KAPI BOOL APIENTRY NtGdiD3dContextCreate(_In_ HANDLE hDirectDrawLocal, _In_ HANDLE hSurfColor, _In_ HANDLE hSurfZ, _Inout_ D3DNTHAL_CONTEXTCREATEI *pdcci)
PVOID HANDLE
Definition: typedefs.h:71
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: d3dhal.h:241

Referenced by DdQueryDirectDrawObject().

◆ DdAddAttachedSurface()

DWORD WINAPI DdAddAttachedSurface ( LPDDHAL_ADDATTACHEDSURFACEDATA  Attach)

Definition at line 35 of file gdientry.c.

36 {
37  /* Call win32k */
38  return NtGdiDdAddAttachedSurface((HANDLE)Attach->lpDDSurface->hDDSurface,
39  (HANDLE)Attach->lpSurfAttached->hDDSurface,
41 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAddAttachedSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached, _Inout_ PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData)
LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached
Definition: ddrawi.h:1690
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1689

Referenced by DdQueryDirectDrawObject().

◆ DdAlphaBlt()

DWORD WINAPI DdAlphaBlt ( LPDDHAL_BLTDATA  pDdAlphaBlt)

Definition at line 832 of file gdientry.c.

833 {
834  HANDLE hDDSrcSurface = 0;
835 
836  if (pDdAlphaBlt->lpDDSrcSurface != 0)
837  {
838  hDDSrcSurface = (HANDLE) pDdAlphaBlt->lpDDSrcSurface->hDDSurface;
839  }
840 
841  return NtGdiDdAlphaBlt((HANDLE)pDdAlphaBlt->lpDDDestSurface->hDDSurface, hDDSrcSurface, (PDD_BLTDATA)&pDdAlphaBlt);
842 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAlphaBlt(_In_ HANDLE hSurfaceDest, _In_opt_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
PVOID HANDLE
Definition: typedefs.h:71
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847

Referenced by DdGetDriverInfo().

◆ DdAttachSurface()

BOOL WINAPI DdAttachSurface ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceFrom,
LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceTo 
)

Definition at line 1983 of file gdientry.c.

1985 {
1986  /* Create Surface if it does not exits one */
1987  if (!pSurfaceFrom->hDDSurface)
1988  {
1989  if (!bDDCreateSurface(pSurfaceFrom, FALSE))
1990  {
1991  return FALSE;
1992  }
1993  }
1994 
1995  /* Create Surface if it does not exits one */
1996  if (!pSurfaceTo->hDDSurface)
1997  {
1999  {
2000  return FALSE;
2001  }
2002  }
2003 
2004  /* Call win32k */
2005  return NtGdiDdAttachSurface((HANDLE)pSurfaceFrom->hDDSurface,
2006  (HANDLE)pSurfaceTo->hDDSurface);
2007 }
BOOL WINAPI bDDCreateSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
Definition: gdientry.c:1392
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdAttachSurface(_In_ HANDLE hSurfaceFrom, _In_ HANDLE hSurfaceTo)
LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
Definition: main.h:121

◆ DdBlt()

DWORD WINAPI DdBlt ( LPDDHAL_BLTDATA  Blt)

Definition at line 50 of file gdientry.c.

51 {
52  HANDLE Surface = 0;
53 
54  /* Use the right surface */
55  if (Blt->lpDDSrcSurface)
56  {
57  Surface = (HANDLE)Blt->lpDDSrcSurface->hDDSurface;
58  }
59 
60  /* Call win32k */
61  return NtGdiDdBlt((HANDLE)Blt->lpDDDestSurface->hDDSurface, Surface, (PDD_BLTDATA)Blt);
62 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdBlt(_In_ HANDLE hSurfaceDest, _In_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
PVOID HANDLE
Definition: typedefs.h:71
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847

Referenced by DdQueryDirectDrawObject().

◆ DdCanCreateD3DBuffer()

DWORD WINAPI DdCanCreateD3DBuffer ( LPDDHAL_CANCREATESURFACEDATA  CanCreateD3DBuffer)

Definition at line 1256 of file gdientry.c.

1257 {
1258  /*
1259  * Note : This functions are basic same, in win32k
1260  * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
1261  * toghter in win32k at end and retrurn same data, it is still sepreated
1262  * at user mode but in kmode it is not.
1263  */
1264 
1265  /* Call win32k */
1266  return NtGdiDdCanCreateD3DBuffer(GetDdHandle(CanCreateD3DBuffer->lpDD->hDD),
1267  (PDD_CANCREATESURFACEDATA)CanCreateD3DBuffer);
1268 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784

Referenced by DdQueryDirectDrawObject().

◆ DdCanCreateSurface()

DWORD WINAPI DdCanCreateSurface ( LPDDHAL_CANCREATESURFACEDATA  CanCreateSurface)

Definition at line 260 of file gdientry.c.

261 {
262  /*
263  * Note : This functions are basic same, in win32k
264  * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
265  * toghter in win32k at end and retrurn same data, it is still sepreated
266  * at user mode but in kmode it is not.
267  */
268 
269  /* Call win32k */
270  return NtGdiDdCanCreateSurface(GetDdHandle(CanCreateSurface->lpDD->hDD),
271  (PDD_CANCREATESURFACEDATA)CanCreateSurface);
272 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateSurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784

Referenced by DdQueryDirectDrawObject().

◆ DdColorControl()

DWORD WINAPI DdColorControl ( LPDDHAL_COLORCONTROLDATA  pDdColorControl)

Definition at line 866 of file gdientry.c.

867 {
868  return NtGdiDdColorControl( (HANDLE) pDdColorControl->lpDDSurface->hDDSurface, (PDD_COLORCONTROLDATA) &pDdColorControl);
869 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1709
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdColorControl(_In_ HANDLE hSurface, _Inout_ PDD_COLORCONTROLDATA puColorControlData)

Referenced by DdGetDriverInfo().

◆ DdCreateD3DBuffer()

DWORD WINAPI DdCreateD3DBuffer ( LPDDHAL_CREATESURFACEDATA  pCreateSurface)

Definition at line 1278 of file gdientry.c.

1279 {
1280  HANDLE puhSurface = 0;
1281  DDRAWI_DDRAWSURFACE_GBL *pSurfGBL;
1282  DDRAWI_DDRAWSURFACE_LCL *pSurfLcl;
1283  DD_SURFACE_GLOBAL puSurfaceGlobalData;
1284  DD_SURFACE_MORE puSurfaceMoreData;
1285  DD_SURFACE_LOCAL puSurfaceLocalData;
1286  DWORD retValue;
1287 
1288  /* Zero all local memory pointer */
1289  RtlZeroMemory(&puSurfaceGlobalData, sizeof(DD_SURFACE_GLOBAL) );
1290  RtlZeroMemory(&puSurfaceMoreData, sizeof(DD_SURFACE_MORE) ) ;
1291  RtlZeroMemory(&puSurfaceLocalData, sizeof(DD_SURFACE_LOCAL) );
1292 
1293  pCreateSurface->dwSCnt = 1;
1294  pSurfLcl = pCreateSurface->lplpSList[0];
1295  pSurfGBL = pSurfLcl->lpGbl;
1296 
1297  /* Convert DDRAWI_DDRAWSURFACE_GBL to DD_SURFACE_GLOBAL */
1298  puSurfaceGlobalData.wWidth = pSurfGBL->wWidth;
1299  puSurfaceGlobalData.wHeight = pSurfGBL->wHeight;
1300  puSurfaceGlobalData.dwLinearSize = pSurfGBL->dwLinearSize;
1301  puSurfaceGlobalData.fpVidMem = pSurfGBL->fpVidMem;
1302  puSurfaceGlobalData.dwBlockSizeX = pSurfGBL->dwBlockSizeX;
1303  puSurfaceGlobalData.dwBlockSizeY = pSurfGBL->dwBlockSizeY;
1304 
1305  /* Convert DDRAWI_DDRAWSURFACE_MORE to DD_SURFACE_MORE */
1306  puSurfaceMoreData.dwSurfaceHandle = pSurfLcl->lpSurfMore->dwSurfaceHandle;
1307  puSurfaceMoreData.ddsCapsEx.dwCaps2 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps2;
1308  puSurfaceMoreData.ddsCapsEx.dwCaps3 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps3;
1309  puSurfaceMoreData.ddsCapsEx.dwCaps4 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps4;
1310 
1311  /* Convert DDRAWI_DDRAWSURFACE_LCL to DD_SURFACE_LOCAL */
1312  puSurfaceLocalData.dwFlags = pSurfLcl->dwFlags;
1313  puSurfaceLocalData.ddsCaps.dwCaps = pSurfLcl->ddsCaps.dwCaps;
1314 
1315  /* Call win32k */
1316  retValue = NtGdiDdCreateD3DBuffer( GetDdHandle(pCreateSurface->lpDD->hDD),
1317  (HANDLE*)&pSurfLcl->hDDSurface,
1318  pCreateSurface->lpDDSurfaceDesc,
1319  &puSurfaceGlobalData,
1320  &puSurfaceLocalData,
1321  &puSurfaceMoreData,
1322  (DD_CREATESURFACEDATA *) pCreateSurface,
1323  &puhSurface);
1324 
1325  /* Setup surface handle if we got one back */
1326  if ( puhSurface != NULL )
1327  {
1328  pCreateSurface->lplpSList[0]->hDDSurface = (ULONG_PTR)puhSurface;
1329  }
1330 
1331  /* Convert DD_SURFACE_GLOBAL to DDRAWI_DDRAWSURFACE_GBL */
1332  pSurfGBL->dwLinearSize = puSurfaceGlobalData.dwLinearSize;
1333  pSurfGBL->fpVidMem = puSurfaceGlobalData.fpVidMem;
1334  pSurfGBL->dwBlockSizeX = puSurfaceGlobalData.dwBlockSizeX;
1335  pSurfGBL->dwBlockSizeY = puSurfaceGlobalData.dwBlockSizeY;
1336 
1337  return retValue;
1338 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateD3DBuffer(_In_ HANDLE hDirectDraw, _Inout_ HANDLE *hSurface, _Inout_ DDSURFACEDESC *puSurfaceDescription, _Inout_ DD_SURFACE_GLOBAL *puSurfaceGlobalData, _Inout_ DD_SURFACE_LOCAL *puSurfaceLocalData, _Inout_ DD_SURFACE_MORE *puSurfaceMoreData, _Inout_ DD_CREATESURFACEDATA *puCreateSurfaceData, _Inout_ HANDLE *puhSurface)
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
DWORD dwSurfaceHandle
Definition: ddrawint.h:166
DDSCAPSEX ddsCapsEx
Definition: ddrawint.h:165
LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore
Definition: ddrawi.h:1467
DWORD dwCaps
Definition: ddraw.h:727
DDSCAPS ddsCaps
Definition: ddrawint.h:174
DWORD dwCaps3
Definition: ddraw.h:1060
#define GetDdHandle(Handle)
Definition: gdientry.c:22
DWORD dwCaps4
Definition: ddraw.h:1063
smooth NULL
Definition: ftsmooth.c:416
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
DWORD dwCaps2
Definition: ddraw.h:1059
unsigned long DWORD
Definition: ntddk_ex.h:95
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
FLATPTR fpVidMem
Definition: ddrawint.h:146
#define ULONG_PTR
Definition: config.h:101
LPDDRAWI_DDRAWSURFACE_GBL lpGbl
Definition: ddrawi.h:1468

Referenced by DdQueryDirectDrawObject().

◆ DdCreateDIBSection()

HBITMAP WINAPI DdCreateDIBSection ( HDC  hdc,
CONST BITMAPINFO pbmi,
UINT  iUsage,
VOID **  ppvBits,
HANDLE  hSectionApp,
DWORD  dwOffset 
)

Definition at line 1949 of file gdientry.c.

1955 {
1957  return 0;
1958 }
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ DdCreateDirectDrawObject()

BOOL WINAPI DdCreateDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
HDC  hdc 
)

Definition at line 1455 of file gdientry.c.

1457 {
1458  BOOL Return = FALSE;
1459 
1460  /* Check if the global hDC (hdc == 0) is being used */
1461  if (!hdc)
1462  {
1463  /* We'll only allow this if the global object doesn't exist yet */
1464  if (!ghDirectDraw)
1465  {
1466  /* Create the DC */
1467  if ((hdc = CreateDCW(L"Display", NULL, NULL, NULL)))
1468  {
1469  /* Create the DDraw Object */
1471 
1472  /* Delete our DC */
1473  DeleteDC(hdc);
1474  }
1475  }
1476 
1477  /* If we created the object, or had one ...*/
1478  if (ghDirectDraw)
1479  {
1480  /* Increase count and set success */
1481  gcDirectDraw++;
1482  Return = TRUE;
1483  }
1484 
1485  /* Zero the handle */
1486  pDirectDrawGlobal->hDD = 0;
1487  }
1488  else
1489  {
1490  /* Using the per-process object, so create it */
1491  pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc);
1492 
1493  /* Set the return value */
1494  Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
1495  }
1496 
1497  /* Return to caller */
1498  return Return;
1499 }
#define TRUE
Definition: types.h:120
HANDLE ghDirectDraw
Definition: gdientry.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
ULONG gcDirectDraw
Definition: gdientry.c:20
BOOL WINAPI DeleteDC(_In_ HDC)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
#define ULONG_PTR
Definition: config.h:101

◆ DdCreateSurface()

DWORD WINAPI DdCreateSurface ( LPDDHAL_CREATESURFACEDATA  pCreateSurface)

Definition at line 281 of file gdientry.c.

282 {
284  ULONG SurfaceCount = pCreateSurface->dwSCnt;
285  DD_SURFACE_LOCAL DdSurfaceLocal;
286  DD_SURFACE_MORE DdSurfaceMore;
287  DD_SURFACE_GLOBAL DdSurfaceGlobal;
288 
289  HANDLE hPrevSurface, hSurface;
290 
291  PDD_SURFACE_LOCAL pDdSurfaceLocal = NULL;
292  PDD_SURFACE_MORE pDdSurfaceMore = NULL;
293  PDD_SURFACE_GLOBAL pDdSurfaceGlobal = NULL;
294 
295  PDD_SURFACE_LOCAL ptmpDdSurfaceLocal = NULL;
296  PDD_SURFACE_MORE ptmpDdSurfaceMore = NULL;
297  PDD_SURFACE_GLOBAL ptmpDdSurfaceGlobal = NULL;
298  PHANDLE phSurface = NULL, puhSurface = NULL;
299  ULONG i;
300  LPDDSURFACEDESC pSurfaceDesc = NULL;
301 
302  /* TODO: Optimize speed. Most games/dx apps/programs do not want one surface, they want at least two.
303  * So we need increase the stack to contain two surfaces instead of one. This will increase
304  * the speed of the apps when allocating buffers. How to increase the surface stack space:
305  * we need to create a struct for DD_SURFACE_LOCAL DdSurfaceLocal, DD_SURFACE_MORE DdSurfaceMore
306  * DD_SURFACE_GLOBAL DdSurfaceGlobal, HANDLE hPrevSurface, hSurface like
307  * struct { DD_SURFACE_LOCAL DdSurfaceLocal1, DD_SURFACE_LOCAL DdSurfaceLocal2 }
308  * in a way that it may contain two surfaces, maybe even four. We need to watch what is most common before
309  * we create the size. Activate this IF when you start doing the optimze and please also
310  * take reports from users which value they got here.
311  */
312 #if 1
313  {
314  char buffer[1024];
315  \
316  sprintf ( buffer, "Function %s : Optimze max to %d Surface ? (%s:%d)\n", __FUNCTION__, (int)SurfaceCount,__FILE__,__LINE__ );
318  }
319 #endif
320 
321  /* Check how many surfaces there are */
322  if (SurfaceCount != 1)
323  {
324  /* We got more than one surface, so we need to allocate memory for them */
325  pDdSurfaceLocal = (PDD_SURFACE_LOCAL) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_LOCAL) * SurfaceCount ));
326  pDdSurfaceMore = (PDD_SURFACE_MORE) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_MORE) * SurfaceCount ));
327  pDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_GLOBAL) * SurfaceCount ));
328  phSurface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(HANDLE) * SurfaceCount ));
329  puhSurface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(HANDLE) * SurfaceCount ));
330 
331  /* Check if we successfully allocated all memory we need */
332  if ((pDdSurfaceLocal == NULL) || (pDdSurfaceMore == NULL) || (pDdSurfaceGlobal == NULL) || (phSurface == NULL) || (puhSurface == NULL))
333  {
334  pCreateSurface->ddRVal = DDERR_OUTOFMEMORY;
335 
336  if ( pDdSurfaceLocal != NULL )
337  {
338  HeapFree(GetProcessHeap(), 0, pDdSurfaceLocal);
339  }
340 
341  if ( pDdSurfaceMore != NULL )
342  {
343  HeapFree(GetProcessHeap(), 0, pDdSurfaceMore);
344  }
345 
346  if ( pDdSurfaceGlobal != NULL )
347  {
348  HeapFree(GetProcessHeap(), 0, pDdSurfaceGlobal);
349  }
350 
351  if ( phSurface != NULL )
352  {
353  HeapFree(GetProcessHeap(), 0, phSurface);
354  }
355 
356  if ( puhSurface != NULL )
357  {
358  HeapFree(GetProcessHeap(), 0, puhSurface);
359  }
360 
361  return DDHAL_DRIVER_HANDLED;
362  }
363  }
364  else
365  {
366  /* We'll use what we have on the stack */
367  pDdSurfaceLocal = &DdSurfaceLocal;
368  pDdSurfaceMore = &DdSurfaceMore;
369  pDdSurfaceGlobal = &DdSurfaceGlobal;
370  phSurface = &hPrevSurface;
371  puhSurface = &hSurface;
372 
373  /* Clear the structures */
374  RtlZeroMemory(&DdSurfaceLocal, sizeof(DdSurfaceLocal));
375  RtlZeroMemory(&DdSurfaceGlobal, sizeof(DdSurfaceGlobal));
376  RtlZeroMemory(&DdSurfaceMore, sizeof(DdSurfaceMore));
377  }
378 
379  /* check if we got a surface or not */
380  if (SurfaceCount!=0)
381  {
382  /* Loop for each surface */
383  ptmpDdSurfaceGlobal = pDdSurfaceGlobal;
384  ptmpDdSurfaceLocal = pDdSurfaceLocal;
385  ptmpDdSurfaceMore = pDdSurfaceMore;
386  pSurfaceDesc = pCreateSurface->lpDDSurfaceDesc;
387 
388  for (i = 0; i < SurfaceCount; i++)
389  {
390  LPDDRAWI_DDRAWSURFACE_LCL lcl = pCreateSurface->lplpSList[i];
391  LPDDRAWI_DDRAWSURFACE_GBL gpl = pCreateSurface->lplpSList[i]->lpGbl;
392 
393  phSurface[i] = (HANDLE)lcl->hDDSurface;
394  ptmpDdSurfaceLocal->ddsCaps.dwCaps = lcl->ddsCaps.dwCaps;
395 
396  ptmpDdSurfaceLocal->dwFlags = (ptmpDdSurfaceLocal->dwFlags &
397  (0xB0000000 | DDRAWISURF_INMASTERSPRITELIST |
401  (lcl->dwFlags & DDRAWISURF_DRIVERMANAGED);
402 
403  ptmpDdSurfaceGlobal->wWidth = gpl->wWidth;
404  ptmpDdSurfaceGlobal->wHeight = gpl->wHeight;
405  ptmpDdSurfaceGlobal->lPitch = gpl->lPitch;
406  ptmpDdSurfaceGlobal->fpVidMem = gpl->fpVidMem;
407  ptmpDdSurfaceGlobal->dwBlockSizeX = gpl->dwBlockSizeX;
408  ptmpDdSurfaceGlobal->dwBlockSizeY = gpl->dwBlockSizeY;
409 
410  if (lcl->dwFlags & DDRAWISURF_HASPIXELFORMAT)
411  {
412  RtlCopyMemory( &ptmpDdSurfaceGlobal->ddpfSurface ,
413  &gpl->ddpfSurface,
414  sizeof(DDPIXELFORMAT));
415 
416  ptmpDdSurfaceGlobal->ddpfSurface.dwSize = sizeof(DDPIXELFORMAT);
417  }
418  else
419  {
420  RtlCopyMemory( &ptmpDdSurfaceGlobal->ddpfSurface ,
421  &gpl->lpDD->vmiData.ddpfDisplay,
422  sizeof(DDPIXELFORMAT));
423  }
424 
425  /* Note if lcl->lpSurfMore is NULL zero out
426  * ptmpDdSurfaceMore->ddsCapsEx.dwCaps2,
427  * dwCaps3, dwCaps4, ptmpDdSurfaceMore->dwSurfaceHandle
428  */
429  if (lcl->lpSurfMore)
430  {
431  ptmpDdSurfaceMore->ddsCapsEx.dwCaps2 = lcl->lpSurfMore->ddsCapsEx.dwCaps2;
432  ptmpDdSurfaceMore->ddsCapsEx.dwCaps3 = lcl->lpSurfMore->ddsCapsEx.dwCaps3;
433  ptmpDdSurfaceMore->ddsCapsEx.dwCaps4 = lcl->lpSurfMore->ddsCapsEx.dwCaps4;
434  ptmpDdSurfaceMore->dwSurfaceHandle = lcl->lpSurfMore->dwSurfaceHandle;
435  }
436 
437 
438  /* count to next SurfaceCount */
439  ptmpDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceGlobal)) + sizeof(DD_SURFACE_GLOBAL));
440  ptmpDdSurfaceLocal = (PDD_SURFACE_LOCAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceLocal)) + sizeof(DD_SURFACE_LOCAL));
441  ptmpDdSurfaceMore = (PDD_SURFACE_MORE) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceMore)) + sizeof(DD_SURFACE_MORE));
442  }
443  }
444 
445  /* Call win32k now */
446  pCreateSurface->ddRVal = DDERR_GENERIC;
447 
448  Return = NtGdiDdCreateSurface(GetDdHandle(pCreateSurface->lpDD->hDD),
449  (HANDLE *)phSurface,
450  pSurfaceDesc,
451  pDdSurfaceGlobal,
452  pDdSurfaceLocal,
453  pDdSurfaceMore,
454  (PDD_CREATESURFACEDATA)pCreateSurface,
455  puhSurface);
456 
457  if (SurfaceCount == 0)
458  {
459  pCreateSurface->ddRVal = DDERR_GENERIC;
460  }
461  else
462  {
463  ptmpDdSurfaceMore = pDdSurfaceMore;
464  ptmpDdSurfaceGlobal = pDdSurfaceGlobal;
465  ptmpDdSurfaceLocal = pDdSurfaceLocal;
466 
467  for (i=0; i<SurfaceCount; i++)
468  {
469  LPDDRAWI_DDRAWSURFACE_LCL lcl = pCreateSurface->lplpSList[i];
470  LPDDRAWI_DDRAWSURFACE_GBL gpl = pCreateSurface->lplpSList[i]->lpGbl;
471 
472  gpl->lPitch = ptmpDdSurfaceGlobal->lPitch;
473  gpl->fpVidMem = ptmpDdSurfaceGlobal->fpVidMem;
474  gpl->dwBlockSizeX = ptmpDdSurfaceGlobal->dwBlockSizeX;
475  gpl->dwBlockSizeY = ptmpDdSurfaceGlobal->dwBlockSizeY;
476 
477  if (lcl->dwFlags & DDRAWISURF_HASPIXELFORMAT)
478  {
479  RtlCopyMemory( &gpl->ddpfSurface, &ptmpDdSurfaceGlobal->ddpfSurface , sizeof(DDPIXELFORMAT));
480  }
481 
482  if (pCreateSurface->ddRVal != DD_OK)
483  {
484  gpl->fpVidMem = 0;
485  if (lcl->hDDSurface)
486  {
487  NtGdiDdDeleteSurfaceObject( (HANDLE)lcl->hDDSurface);
488  }
489  lcl->hDDSurface = 0;
490  }
491  else
492  {
493 
494  lcl->hDDSurface = (ULONG_PTR) puhSurface[i];
495  }
496 
497  lcl->ddsCaps.dwCaps = ptmpDdSurfaceLocal->ddsCaps.dwCaps;
498  if (lcl->lpSurfMore)
499  {
500  lcl->lpSurfMore->ddsCapsEx.dwCaps2 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps2;
501  lcl->lpSurfMore->ddsCapsEx.dwCaps3 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps3;
502  lcl->lpSurfMore->ddsCapsEx.dwCaps4 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps4;
503  }
504 
505  /* count to next SurfaceCount */
506  ptmpDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceGlobal)) + sizeof(DD_SURFACE_GLOBAL));
507  ptmpDdSurfaceLocal = (PDD_SURFACE_LOCAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceLocal)) + sizeof(DD_SURFACE_LOCAL));
508  ptmpDdSurfaceMore = (PDD_SURFACE_MORE) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceMore)) + sizeof(DD_SURFACE_MORE));
509  }
510  }
511 
512  /* Check if we have to free all our local allocations */
513  if (SurfaceCount > 1)
514  {
515  if ( pDdSurfaceLocal != NULL )
516  {
517  HeapFree(GetProcessHeap(), 0, pDdSurfaceLocal);
518  }
519 
520  if ( pDdSurfaceMore != NULL )
521  {
522  HeapFree(GetProcessHeap(), 0, pDdSurfaceMore);
523  }
524 
525  if ( pDdSurfaceGlobal != NULL )
526  {
527  HeapFree(GetProcessHeap(), 0, pDdSurfaceGlobal);
528  }
529 
530  if ( phSurface != NULL )
531  {
532  HeapFree(GetProcessHeap(), 0, phSurface);
533  }
534 
535  if ( puhSurface != NULL )
536  {
537  HeapFree(GetProcessHeap(), 0, puhSurface);
538  }
539  }
540 
541  /* Return */
542  return Return;
543 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateSurface(_In_ HANDLE hDirectDraw, _In_ HANDLE *hSurface, _Inout_ DDSURFACEDESC *puSurfaceDescription, _Inout_ DD_SURFACE_GLOBAL *puSurfaceGlobalData, _Inout_ DD_SURFACE_LOCAL *puSurfaceLocalData, _Inout_ DD_SURFACE_MORE *puSurfaceMoreData, _Inout_ DD_CREATESURFACEDATA *puCreateSurfaceData, _Out_ HANDLE *puhSurface)
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
DWORD dwSurfaceHandle
Definition: ddrawint.h:166
DDSCAPSEX ddsCapsEx
Definition: ddrawint.h:165
struct _DD_SURFACE_LOCAL DD_SURFACE_LOCAL
#define DDRAWISURF_INVALID
Definition: ddrawi.h:1530
DWORD dwCaps
Definition: ddraw.h:727
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DDSCAPS ddsCaps
Definition: ddrawint.h:174
DWORD dwCaps3
Definition: ddraw.h:1060
#define DDRAWISURF_HASPIXELFORMAT
Definition: ddrawi.h:1515
GLuint buffer
Definition: glext.h:5915
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1346
#define DDRAWISURF_FRONTBUFFER
Definition: ddrawi.h:1528
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define GetDdHandle(Handle)
Definition: gdientry.c:22
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteSurfaceObject(_In_ HANDLE hSurface)
struct _DDPIXELFORMAT DDPIXELFORMAT
#define DDRAWISURF_DCIBUSY
Definition: ddrawi.h:1531
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
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
struct _DD_SURFACE_LOCAL * PDD_SURFACE_LOCAL
struct _DD_SURFACE_GLOBAL DD_SURFACE_GLOBAL
struct _DD_SURFACE_GLOBAL * PDD_SURFACE_GLOBAL
DWORD dwCaps4
Definition: ddraw.h:1063
smooth NULL
Definition: ftsmooth.c:416
#define DDERR_GENERIC
Definition: ddraw.h:72
#define DDRAWISURF_DRIVERMANAGED
Definition: ddrawi.h:1534
struct _DDRAWI_DDRAWSURFACE_LCL FAR * LPDDRAWI_DDRAWSURFACE_LCL
Definition: d3dhal.h:45
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
DWORD dwCaps2
Definition: ddraw.h:1059
#define DDRAWISURF_DCILOCK
Definition: ddrawi.h:1535
#define DDRAWISURF_INMASTERSPRITELIST
Definition: ddrawi.h:1526
PVOID HANDLE
Definition: typedefs.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
struct _DD_SURFACE_MORE * PDD_SURFACE_MORE
DDPIXELFORMAT ddpfSurface
Definition: ddrawint.h:156
#define DDRAWISURF_HELCB
Definition: ddrawi.h:1527
struct _DD_SURFACE_MORE DD_SURFACE_MORE
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DDPIXELFORMAT ddpfSurface
Definition: ddrawi.h:1358
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
FLATPTR fpVidMem
Definition: ddrawint.h:146
#define ULONG_PTR
Definition: config.h:101
#define DDRAWISURF_BACKBUFFER
Definition: ddrawi.h:1529
#define __FUNCTION__
Definition: types.h:112
BYTE * PBYTE
Definition: pedump.c:66
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
DWORD dwSize
Definition: ddraw.h:1070
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by DdQueryDirectDrawObject().

◆ DdCreateSurfaceEx()

DWORD WINAPI DdCreateSurfaceEx ( LPDDHAL_CREATESURFACEEXDATA  pDdCreateSurfaceEx)

Definition at line 851 of file gdientry.c.

852 {
853  pDdCreateSurfaceEx->ddRVal = NtGdiDdCreateSurfaceEx( GetDdHandle(pDdCreateSurfaceEx->lpDDLcl->lpGbl->hDD),
854  (HANDLE)pDdCreateSurfaceEx->lpDDSLcl->hDDSurface,
855  pDdCreateSurfaceEx->lpDDSLcl->lpSurfMore->dwSurfaceHandle);
856  return TRUE;
857 }
#define TRUE
Definition: types.h:120
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: ddrawi.h:1065
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: ddrawi.h:1066
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateSurfaceEx(_In_ HANDLE hDirectDraw, _In_ HANDLE hSurface, _In_ DWORD dwSurfaceHandle)

Referenced by DdGetDriverInfo().

◆ DdCreateSurfaceObject()

BOOL WINAPI DdCreateSurfaceObject ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
BOOL  bPrimarySurface 
)

Definition at line 1873 of file gdientry.c.

1875 {
1876  return bDDCreateSurface(pSurfaceLocal, TRUE);
1877 }
#define TRUE
Definition: types.h:120
BOOL WINAPI bDDCreateSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
Definition: gdientry.c:1392

◆ DdDeleteDirectDrawObject()

BOOL WINAPI DdDeleteDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal)

Definition at line 1831 of file gdientry.c.

1832 {
1833  BOOL Return = FALSE;
1834 
1835  /* If this is the global object */
1836  if(pDirectDrawGlobal->hDD)
1837  {
1838  /* Free it */
1839  Return = NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
1840  if (Return)
1841  {
1842  pDirectDrawGlobal->hDD = 0;
1843  }
1844  }
1845  else if (ghDirectDraw)
1846  {
1847  /* Always success here */
1848  Return = TRUE;
1849 
1850  /* Make sure this is the last instance */
1851  if (!(--gcDirectDraw))
1852  {
1853  /* Delete the object */
1855  if (Return)
1856  {
1857  ghDirectDraw = 0;
1858  }
1859  }
1860  }
1861 
1862  /* Return */
1863  return Return;
1864 }
#define TRUE
Definition: types.h:120
HANDLE ghDirectDraw
Definition: gdientry.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)
ULONG gcDirectDraw
Definition: gdientry.c:20

◆ DdDeleteSurfaceObject()

BOOL WINAPI DdDeleteSurfaceObject ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal)

Definition at line 1887 of file gdientry.c.

1888 {
1889  BOOL Return = FALSE;
1890 
1891  /* Make sure there is one */
1892  if (pSurfaceLocal->hDDSurface)
1893  {
1894  /* Delete it */
1895  Return = NtGdiDdDeleteSurfaceObject((HANDLE)pSurfaceLocal->hDDSurface);
1896  pSurfaceLocal->hDDSurface = 0;
1897  }
1898 
1899  return Return;
1900 }
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteSurfaceObject(_In_ HANDLE hSurface)
unsigned int BOOL
Definition: ntddk_ex.h:94

◆ DdDestroyD3DBuffer()

DWORD WINAPI DdDestroyD3DBuffer ( LPDDHAL_DESTROYSURFACEDATA  pDestroySurface)

Definition at line 1347 of file gdientry.c.

1348 {
1349  DWORD retValue = 0;
1350  if ( pDestroySurface->lpDDSurface->hDDSurface)
1351  {
1352  /* Call win32k */
1353  retValue = NtGdiDdDestroyD3DBuffer((HANDLE)pDestroySurface->lpDDSurface->hDDSurface);
1354  }
1355 
1356  return retValue;
1357 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:811
unsigned long DWORD
Definition: ntddk_ex.h:95
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroyD3DBuffer(_In_ HANDLE hSurface)

Referenced by DdQueryDirectDrawObject().

◆ DdDestroySurface()

DWORD WINAPI DdDestroySurface ( LPDDHAL_DESTROYSURFACEDATA  pDestroySurface)

Definition at line 71 of file gdientry.c.

72 {
74  BOOL RealDestroy;
75 
76  if (pDestroySurface->lpDDSurface->hDDSurface)
77  {
78  /* Check if we shoudl really destroy it */
79  RealDestroy = !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_DRIVERMANAGED) ||
80  !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_INVALID);
81 
82  /* Call win32k */
83  Return = NtGdiDdDestroySurface((HANDLE)pDestroySurface->lpDDSurface->hDDSurface, RealDestroy);
84  }
85 
86  return Return;
87 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:811
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroySurface(_In_ HANDLE hSurface, _In_ BOOL bRealDestroy)
#define DDRAWISURF_INVALID
Definition: ddrawi.h:1530
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DDRAWISURF_DRIVERMANAGED
Definition: ddrawi.h:1534
unsigned long DWORD
Definition: ntddk_ex.h:95

Referenced by DdQueryDirectDrawObject().

◆ DdFlip()

DWORD WINAPI DdFlip ( LPDDHAL_FLIPDATA  Flip)

Definition at line 96 of file gdientry.c.

97 {
98  /* Note :
99  * See http://msdn2.microsoft.com/en-us/library/ms794213.aspx and
100  * http://msdn2.microsoft.com/en-us/library/ms792675.aspx
101  */
102 
103  HANDLE hSurfaceCurrentLeft = NULL;
104  HANDLE hSurfaceTargetLeft = NULL;
105 
106  /* Auto flip off or on */
107  if (Flip->dwFlags & DDFLIP_STEREO )
108  {
109  if ( (Flip->lpSurfTargLeft) &&
110  (Flip->lpSurfCurrLeft))
111  {
112  /* Auto flip on */
113  hSurfaceTargetLeft = (HANDLE) Flip->lpSurfTargLeft->hDDSurface;
114  hSurfaceCurrentLeft = (HANDLE) Flip->lpSurfCurrLeft->hDDSurface;
115  }
116  }
117 
118  /* Call win32k */
119  return NtGdiDdFlip( (HANDLE) Flip->lpSurfCurr->hDDSurface,
120  (HANDLE) Flip->lpSurfTarg->hDDSurface,
121  hSurfaceCurrentLeft,
122  hSurfaceTargetLeft,
123  (PDD_FLIPDATA) Flip);
124 }
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft
Definition: ddrawi.h:824
DWORD dwFlags
Definition: ddrawi.h:820
smooth NULL
Definition: ftsmooth.c:416
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:819
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:818
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft
Definition: ddrawi.h:823
#define DDFLIP_STEREO
Definition: ddraw.h:587
PVOID HANDLE
Definition: typedefs.h:71
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlip(_In_ HANDLE hSurfaceCurrent, _In_ HANDLE hSurfaceTarget, _In_ HANDLE hSurfaceCurrentLeft, _In_ HANDLE hSurfaceTargetLeft, _Inout_ PDD_FLIPDATA puFlipData)

Referenced by DdQueryDirectDrawObject().

◆ DdFlipToGDISurface()

DWORD WINAPI DdFlipToGDISurface ( LPDDHAL_FLIPTOGDISURFACEDATA  pDdFlipToGDISurface)

Definition at line 890 of file gdientry.c.

891 {
892  return NtGdiDdFlipToGDISurface( GetDdHandle(pDdFlipToGDISurface->lpDD->hDD), (PDD_FLIPTOGDISURFACEDATA) &pDdFlipToGDISurface);
893 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlipToGDISurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData)
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1746

Referenced by DdGetDriverInfo().

◆ DdGetAvailDriverMemory()

DWORD WINAPI DdGetAvailDriverMemory ( LPDDHAL_GETAVAILDRIVERMEMORYDATA  pDdGetAvailDriverMemory)

Definition at line 820 of file gdientry.c.

821 {
822  return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory->lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
823 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1754
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetAvailDriverMemory(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)

Referenced by DdGetDriverInfo().

◆ DdGetBltStatus()

DWORD WINAPI DdGetBltStatus ( LPDDHAL_GETBLTSTATUSDATA  GetBltStatus)

Definition at line 163 of file gdientry.c.

164 {
165  /* Call win32k */
166  return NtGdiDdGetBltStatus((HANDLE)GetBltStatus->lpDDSurface->hDDSurface,
167  (PDD_GETBLTSTATUSDATA)GetBltStatus);
168 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetBltStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETBLTSTATUSDATA puGetBltStatusData)
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1765

Referenced by DdQueryDirectDrawObject().

◆ DdGetDC()

HDC WINAPI DdGetDC ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
LPPALETTEENTRY  pColorTable 
)

Definition at line 1923 of file gdientry.c.

1925 {
1926  /* Call win32k directly */
1927  return NtGdiDdGetDC(pColorTable, (HANDLE) pSurfaceLocal->hDDSurface);
1928 }
__kernel_entry W32KAPI HDC APIENTRY NtGdiDdGetDC(_In_ HANDLE hSurface, _In_ PALETTEENTRY *puColorTable)

◆ DdGetDriverInfo()

DWORD WINAPI DdGetDriverInfo ( LPDDHAL_GETDRIVERINFODATA  pData)

Definition at line 898 of file gdientry.c.

899 {
900  DDHAL_GETDRIVERINFODATA pDrvInfoData;
901  DWORD retValue = DDHAL_DRIVER_NOTHANDLED;
902  HANDLE hDD;
903 
904  /* FIXME add SEH around this functions */
905 
906  RtlZeroMemory(&pDrvInfoData, sizeof (DDHAL_GETDRIVERINFODATA));
907  RtlCopyMemory(&pDrvInfoData.guidInfo, &pData->guidInfo, sizeof(GUID));
908 
909  hDD = GetDdHandle(pData->dwContext);
910 
911  pDrvInfoData.dwSize = sizeof (DDHAL_GETDRIVERINFODATA);
912  pDrvInfoData.ddRVal = DDERR_GENERIC;
913  pDrvInfoData.dwContext = (ULONG_PTR)hDD;
914 
915 
916  /* Videoport Callbacks check and setup for DirectX/ ReactX */
917  if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks))
918  {
920  DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort = (DDHAL_DDVIDEOPORTCALLBACKS *)pData->lpvData;
921 
922  /* Clear internal out buffer and set it up*/
924  pDvdPort.dwSize = DDVIDEOPORTCALLBACKSSIZE;
925 
926  /* set up internal buffer */
927  pDrvInfoData.lpvData = (PVOID)&pDvdPort;
929 
930  /* Call win32k */
931  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
932 
933  /* Setup user out buffer and convert kmode callbacks to user mode */
934  pUserDvdPort->dwSize = DDVIDEOPORTCALLBACKSSIZE;
935  pUserDvdPort->dwFlags = pDrvInfoData.dwFlags = 0;
936 
937  pUserDvdPort->dwFlags = (pDrvInfoData.dwFlags & ~(DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
941 
942  pData->dwActualSize = DDVIDEOPORTCALLBACKSSIZE;
947 
948  if (pDvdPort.CanCreateVideoPort)
949  {
951  }
952 
953  if (pDvdPort.GetVideoPortBandwidth)
954  {
956  }
957 
958  if (pDvdPort.GetVideoPortInputFormats)
959  {
961  }
962 
963  if (pDvdPort.GetVideoPortOutputFormats)
964  {
966  }
967 
968  if (pDvdPort.GetVideoPortField)
969  {
971  }
972 
973  if (pDvdPort.GetVideoPortLine)
974  {
976  }
977 
978  if (pDvdPort.GetVideoPortConnectInfo)
979  {
981  }
982 
983  if (pDvdPort.GetVideoPortFlipStatus)
984  {
986  }
987 
988  if (pDvdPort.WaitForVideoPortSync)
989  {
991  }
992 
993  if (pDvdPort.GetVideoSignalStatus)
994  {
996  }
997 
998  if (pDvdPort.ColorControl)
999  {
1001  }
1002 
1003  /* Windows XP never repot back the true return value,
1004  * it only report back if we have a driver or not
1005  * ReactOS keep this behoir to be compatible with
1006  * Windows XP
1007  */
1008  pData->ddRVal = retValue;
1009  }
1010 
1011  /* Color Control Callbacks check and setup for DirectX/ ReactX */
1012  if (IsEqualGUID(&pData->guidInfo, &GUID_ColorControlCallbacks))
1013  {
1014  DDHAL_DDCOLORCONTROLCALLBACKS pColorControl;
1015  DDHAL_DDCOLORCONTROLCALLBACKS* pUserColorControl = (DDHAL_DDCOLORCONTROLCALLBACKS *)pData->lpvData;
1016 
1017  /* Clear internal out buffer and set it up*/
1018  RtlZeroMemory(&pColorControl, DDCOLORCONTROLCALLBACKSSIZE);
1019  pColorControl.dwSize = DDCOLORCONTROLCALLBACKSSIZE;
1020 
1021  /* set up internal buffer */
1022  pDrvInfoData.lpvData = (PVOID)&pColorControl;
1024 
1025  /* Call win32k */
1026  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1027 
1028  pData->dwActualSize = DDCOLORCONTROLCALLBACKSSIZE;
1029  pData->dwFlags = pDrvInfoData.dwFlags;
1030 
1031  pUserColorControl->dwSize = DDCOLORCONTROLCALLBACKSSIZE;
1032  pUserColorControl->dwFlags = pColorControl.dwFlags;
1033 
1034  if (pColorControl.ColorControl != NULL)
1035  {
1037  }
1038 
1039  /* Windows XP never repot back the true return value,
1040  * it only report back if we have a driver or not
1041  * ReactOS keep this behoir to be compatible with
1042  * Windows XP
1043  */
1044  pData->ddRVal = retValue;
1045  }
1046 
1047  /* Misc Callbacks check and setup for DirectX/ ReactX */
1048  else if (IsEqualGUID(&pData->guidInfo, &GUID_MiscellaneousCallbacks))
1049  {
1052 
1053  /* Clear internal out buffer and set it up*/
1056 
1057  /* set up internal buffer */
1058  pDrvInfoData.lpvData = (PVOID)&pMisc;
1060 
1061  /* Call win32k */
1062  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1063 
1064  pData->dwActualSize = DDMISCELLANEOUSCALLBACKSSIZE;
1065 
1066  /* Only one callbacks are supported */
1069 
1070  /* This callbacks are only for win9x and theirfor it is not longer use in NT or ReactOS
1071  * pUserMisc->UpdateNonLocalHeap;
1072  * pUserMisc->GetHeapAlignment;
1073  * pUserMisc->GetSysmemBltStatus; */
1074 
1075  /* Windows XP never repot back the true return value,
1076  * it only report back if we have a driver or not
1077  * ReactOS keep this behoir to be compatible with
1078  * Windows XP
1079  */
1080  pData->ddRVal = retValue;
1081  }
1082 
1083  /* Misc 2 Callbacks check and setup for DirectX/ ReactX */
1084  else if (IsEqualGUID(&pData->guidInfo, &GUID_Miscellaneous2Callbacks))
1085  {
1088 
1089  /* Clear internal out buffer and set it up*/
1092 
1093  /* set up internal buffer */
1094  pDrvInfoData.lpvData = (PVOID)&pMisc;
1096 
1097  /* Call win32k */
1098  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1099 
1100  pData->dwActualSize = DDMISCELLANEOUS2CALLBACKSSIZE;
1101 
1102  pUserMisc->dwFlags = pMisc.dwFlags;
1103 
1104  /* This functions are not documneted in MSDN for this struct, here is directx/reactx alpha blend */
1105  if ( pMisc.Reserved )
1106  {
1107  pUserMisc->Reserved = (LPVOID) DdAlphaBlt;
1108  }
1109 
1110  if ( pMisc.CreateSurfaceEx )
1111  {
1113  }
1114 
1115  if ( pMisc.GetDriverState )
1116  {
1118  }
1119 
1120  /* NOTE : pUserMisc->DestroyDDLocal is outdated and are not beign tuch */
1121 
1122  /* Windows XP never repot back the true return value,
1123  * it only report back if we have a driver or not
1124  * ReactOS keep this behoir to be compatible with
1125  * Windows XP
1126  */
1127  pData->ddRVal = retValue;
1128  }
1129 
1130  /* NT Callbacks check and setup for DirectX/ ReactX */
1131  else if (IsEqualGUID(&pData->guidInfo, &GUID_NTCallbacks))
1132  {
1133  /* MS does not have DHAL_* version of this callbacks
1134  * so we are force using PDD_* callbacks here
1135  */
1136  DD_NTCALLBACKS pNtKernel;
1137  PDD_NTCALLBACKS pUserNtKernel = (PDD_NTCALLBACKS)pData->lpvData;
1138 
1139  /* Clear internal out buffer and set it up*/
1140  RtlZeroMemory(&pNtKernel, sizeof(DD_NTCALLBACKS));
1141  pNtKernel.dwSize = sizeof(DD_NTCALLBACKS);
1142 
1143  /* set up internal buffer */
1144  pDrvInfoData.lpvData = (PVOID)&pNtKernel;
1145  pDrvInfoData.dwExpectedSize = sizeof(DD_NTCALLBACKS) ;
1146 
1147  /* Call win32k */
1148  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1149 
1150  pData->dwActualSize = sizeof(DD_NTCALLBACKS);
1151 
1152  pUserNtKernel->dwSize = sizeof(DD_NTCALLBACKS);
1153  pUserNtKernel->dwFlags = pNtKernel.dwFlags;
1154  pUserNtKernel->FreeDriverMemory = 0;
1155 
1156  if (pNtKernel.SetExclusiveMode)
1157  {
1159  }
1160 
1161  if (pNtKernel.FlipToGDISurface)
1162  {
1164  }
1165 
1166  /* Windows XP never repot back the true return value,
1167  * it only report back if we have a driver or not
1168  * ReactOS keep this behoir to be compatible with
1169  * Windows XP
1170  */
1171  pData->ddRVal = retValue;
1172  }
1173 
1174  /* D3D Callbacks version 2 check and setup for DirectX/ ReactX */
1175  else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks2))
1176  {
1177  // FIXME GUID_D3DCallbacks2
1178  }
1179 
1180  /* D3D Callbacks version 3 check and setup for DirectX/ ReactX */
1181  else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks3))
1182  {
1183  // FIXME GUID_D3DCallbacks3
1184  }
1185 
1186  /* D3DParseUnknownCommand Callbacks check and setup for DirectX/ ReactX */
1187  else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DParseUnknownCommandCallback))
1188  {
1189  // FIXME GUID_D3DParseUnknownCommandCallback
1190  }
1191 
1192  /* MotionComp Callbacks check and setup for DirectX/ ReactX */
1193  else if (IsEqualGUID(&pData->guidInfo, &GUID_MotionCompCallbacks))
1194  {
1195  // FIXME GUID_MotionCompCallbacks
1196  }
1197 
1198  /* FIXME VPE2 Callbacks check and setup for DirectX/ ReactX */
1199  //else if (IsEqualGUID(&pData->guidInfo, &GUID_VPE2Callbacks))
1200  //{
1201  // FIXME GUID_VPE2Callbacks
1202  //}
1203  else
1204  {
1205  /* set up internal buffer */
1206  pDrvInfoData.dwExpectedSize = pData->dwExpectedSize;
1207  pDrvInfoData.lpvData = pData->lpvData;
1208 
1209  /* We do not cover all callbacks for user mode, they are only cover by kmode */
1210  retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1211 
1212  /* Setup return data */
1213  pData->dwActualSize = pDrvInfoData.dwActualSize;
1214  pData->lpvData = pDrvInfoData.lpvData;
1215  /* Windows XP never repot back the true return value,
1216  * it only report back if we have a driver or not
1217  * ReactOS keep this behoir to be compatible with
1218  * Windows XP
1219  */
1220  pData->ddRVal = retValue;
1221  }
1222 
1223  return retValue;
1224 }
#define DDVIDEOPORTCALLBACKSSIZE
Definition: ddrawi.h:633
LPDDHALVPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo
Definition: ddrawi.h:516
LPDDHALVPORTCB_COLORCONTROL ColorControl
Definition: ddrawi.h:522
DWORD WINAPI DdAlphaBlt(LPDDHAL_BLTDATA pDdAlphaBlt)
Definition: gdientry.c:832
DWORD(PASCAL * LPDDHALVPORTCB_COLORCONTROL)(LPDDHAL_VPORTCOLORDATA)
Definition: ddrawi.h:502
#define DDHAL_MISCCB32_GETAVAILDRIVERMEMORY
Definition: ddrawi.h:688
DWORD(PASCAL * LPDDHALVPORTCB_GETLINE)(LPDDHAL_GETVPORTLINEDATA)
Definition: ddrawi.h:495
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
DWORD WINAPI DvpGetVideoPortBandwidth(LPDDHAL_GETVPORTBANDWIDTHDATA pDvdPortBandWidth)
Definition: gdientry.c:624
DWORD WINAPI DvpGetVideoPortField(LPDDHAL_FLIPVPORTDATA pDvdGetVideoPortField)
Definition: gdientry.c:760
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETDRIVERINFODATA puGetDriverInfoData)
DWORD WINAPI DvpWaitForVideoPortSync(LPDDHAL_WAITFORVPORTSYNCDATA pDvdWaitForVideoPortSync)
Definition: gdientry.c:684
DWORD(PASCAL * LPDDHALVPORTCB_FLIP)(LPDDHAL_FLIPVPORTDATA)
Definition: ddrawi.h:490
DWORD(PASCAL * LPDDHALVPORTCB_DESTROYVPORT)(LPDDHAL_DESTROYVPORTDATA)
Definition: ddrawi.h:497
DWORD(WINAPI * PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA)
Definition: ddrawint.h:597
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DWORD(PASCAL * LPDDHALVPORTCB_GETSIGNALSTATUS)(LPDDHAL_GETVPORTSIGNALDATA)
Definition: ddrawi.h:501
DWORD WINAPI DvpFlipVideoPort(LPDDHAL_FLIPVPORTDATA pDvdPortFlip)
Definition: gdientry.c:609
BOOL WINAPI DvpCreateVideoPort(LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
Definition: gdientry.c:581
DWORD(PASCAL * LPDDHALVPORTCB_CANCREATEVIDEOPORT)(LPDDHAL_CANCREATEVPORTDATA)
Definition: ddrawi.h:488
PDD_FREEDRIVERMEMORY FreeDriverMemory
Definition: ddrawint.h:611
LPDDHALVPORTCB_GETSIGNALSTATUS GetVideoSignalStatus
Definition: ddrawi.h:521
#define GetDdHandle(Handle)
Definition: gdientry.c:22
DWORD(PASCAL * LPDDHALVPORTCB_UPDATE)(LPDDHAL_UPDATEVPORTDATA)
Definition: ddrawi.h:499
#define DDHAL_VPORT32_FLIP
Definition: ddrawi.h:703
DWORD(PASCAL * LPDDHALVPORTCB_WAITFORSYNC)(LPDDHAL_WAITFORVPORTSYNCDATA)
Definition: ddrawi.h:500
LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory
Definition: ddrawi.h:449
DWORD(PASCAL * LPDDHALVPORTCB_GETVPORTCONNECT)(LPDDHAL_GETVPORTCONNECTDATA)
Definition: ddrawi.h:496
#define DDHAL_VPORT32_DESTROY
Definition: ddrawi.h:710
DWORD WINAPI DvpGetVideoPortInputFormats(LPDDHAL_GETVPORTINPUTFORMATDATA pDvdGetVideoPortInputFormat)
Definition: gdientry.c:772
LPDDHALVPORTCB_GETFIELD GetVideoPortField
Definition: ddrawi.h:514
LPDDHALVPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort
Definition: ddrawi.h:507
#define DDMISCELLANEOUS2CALLBACKSSIZE
Definition: ddrawi.h:631
#define DDHAL_VPORT32_WAITFORSYNC
Definition: ddrawi.h:713
LPDDHALVPORTCB_GETOUTPUTFORMATS GetVideoPortOutputFormats
Definition: ddrawi.h:512
DWORD(PASCAL * LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA)
Definition: ddrawi.h:459
#define DDHAL_VPORT32_CREATEVIDEOPORT
Definition: ddrawi.h:702
DWORD WINAPI DvpGetVideoPortFlipStatus(LPDDHAL_GETVPORTFLIPSTATUSDATA pDvdPortVideoPortFlipStatus)
Definition: gdientry.c:660
DWORD WINAPI DvpColorControl(LPDDHAL_VPORTCOLORDATA pDvdPortColorControl)
Definition: gdientry.c:636
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI DdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA pDdSetExclusiveMode)
Definition: gdientry.c:878
PDD_FLIPTOGDISURFACE FlipToGDISurface
Definition: ddrawint.h:613
DWORD(PASCAL * LPDDHALVPORTCB_GETFIELD)(LPDDHAL_GETVPORTFIELDDATA)
Definition: ddrawi.h:494
void * PVOID
Definition: retypes.h:9
DWORD(PASCAL * LPDDHALVPORTCB_GETOUTPUTFORMATS)(LPDDHAL_GETVPORTOUTPUTFORMATDATA)
Definition: ddrawi.h:493
LPDDHALVPORTCB_GETBANDWIDTH GetVideoPortBandwidth
Definition: ddrawi.h:510
#define DDERR_GENERIC
Definition: ddraw.h:72
LPDDHALVPORTCB_GETINPUTFORMATS GetVideoPortInputFormats
Definition: ddrawi.h:511
DWORD WINAPI DvpGetVideoPortConnectInfo(LPDDHAL_GETVPORTCONNECTDATA pDvdGetVideoPortInfo)
Definition: gdientry.c:808
DWORD WINAPI DdCreateSurfaceEx(LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx)
Definition: gdientry.c:851
DWORD WINAPI DdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA pDdFlipToGDISurface)
Definition: gdientry.c:890
DWORD(WINAPI * PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA)
Definition: ddrawint.h:606
DWORD(PASCAL * LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA)
Definition: ddrawi.h:442
LPDDHALVPORTCB_CREATEVIDEOPORT CreateVideoPort
Definition: ddrawi.h:508
LPDDHALVPORTCB_GETLINE GetVideoPortLine
Definition: ddrawi.h:515
DWORD(PASCAL * LPDDHALVPORTCB_GETFLIPSTATUS)(LPDDHAL_GETVPORTFLIPSTATUSDATA)
Definition: ddrawi.h:498
unsigned long DWORD
Definition: ntddk_ex.h:95
LPDDHALVPORTCB_UPDATE UpdateVideoPort
Definition: ddrawi.h:519
#define LPVOID
Definition: nt_native.h:45
DWORD WINAPI DvpGetVideoPortLine(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortLine)
Definition: gdientry.c:784
#define DDMISCELLANEOUSCALLBACKSSIZE
Definition: ddrawi.h:630
LPDDHAL_CREATESURFACEEX CreateSurfaceEx
Definition: ddrawi.h:467
DWORD WINAPI DdColorControl(LPDDHAL_COLORCONTROLDATA pDdColorControl)
Definition: gdientry.c:866
LPDDHALCOLORCB_COLORCONTROL ColorControl
Definition: ddrawi.h:532
DWORD WINAPI DvpGetVideoSignalStatus(LPDDHAL_GETVPORTSIGNALDATA pDvdPortVideoSignalStatus)
Definition: gdientry.c:648
DWORD(PASCAL * LPDDHALVPORTCB_GETINPUTFORMATS)(LPDDHAL_GETVPORTINPUTFORMATDATA)
Definition: ddrawi.h:492
DWORD WINAPI DvpUpdateVideoPort(LPDDHAL_UPDATEVPORTDATA pDvdUpdateVideoPort)
Definition: gdientry.c:696
LPDDHAL_GETDRIVERSTATE GetDriverState
Definition: ddrawi.h:468
#define DDHAL_VPORT32_UPDATE
Definition: ddrawi.h:712
LPDDHALVPORTCB_GETFLIPSTATUS GetVideoPortFlipStatus
Definition: ddrawi.h:518
DWORD(PASCAL * LPDDHALVPORTCB_CREATEVIDEOPORT)(LPDDHAL_CREATEVPORTDATA)
Definition: ddrawi.h:489
DWORD WINAPI DdGetAvailDriverMemory(LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverMemory)
Definition: gdientry.c:820
#define DDCOLORCONTROLCALLBACKSSIZE
Definition: ddrawi.h:634
PDD_SETEXCLUSIVEMODE SetExclusiveMode
Definition: ddrawint.h:612
DWORD WINAPI DvpCanCreateVideoPort(LPDDHAL_CANCREATEVPORTDATA pDvdCanCreateVideoPort)
Definition: gdientry.c:673
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
struct _DD_NTCALLBACKS * PDD_NTCALLBACKS
DWORD WINAPI DvpGetVideoPortOutputFormats(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortOutputFormat)
Definition: gdientry.c:796
DWORD(PASCAL * LPDDHAL_GETDRIVERSTATE)(LPDDHAL_GETDRIVERSTATEDATA)
Definition: ddrawi.h:460
DWORD(PASCAL * LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA)
Definition: ddrawi.h:527
LPDDHALVPORTCB_WAITFORSYNC WaitForVideoPortSync
Definition: ddrawi.h:520
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
DWORD(PASCAL * LPDDHALVPORTCB_GETBANDWIDTH)(LPDDHAL_GETVPORTBANDWIDTHDATA)
Definition: ddrawi.h:491
struct _DD_NTCALLBACKS DD_NTCALLBACKS
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
DWORD WINAPI DvpDestroyVideoPort(LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
Definition: gdientry.c:597
LPDDHALVPORTCB_FLIP FlipVideoPort
Definition: ddrawi.h:509
LPDDHALVPORTCB_DESTROYVPORT DestroyVideoPort
Definition: ddrawi.h:517
struct _DDHAL_GETDRIVERINFODATA DDHAL_GETDRIVERINFODATA
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverState(_Inout_ PDD_GETDRIVERSTATEDATA pdata)

Referenced by DdQueryDirectDrawObject(), and StartDirectDrawHal().

◆ DdGetDxHandle()

HANDLE WINAPI DdGetDxHandle ( LPDDRAWI_DIRECTDRAW_LCL  pDDraw,
LPDDRAWI_DDRAWSURFACE_LCL  pSurface,
BOOL  bRelease 
)

Definition at line 2043 of file gdientry.c.

2046 {
2047  HANDLE hDD = NULL;
2048  HANDLE hSurface = NULL;
2049 
2050  /* Check if we already have a surface */
2051  if (!pSurface)
2052  {
2053  /* We don't have one, use the DirectDraw Object handle instead */
2054  hDD = GetDdHandle(pDDraw->lpGbl->hDD);
2055  }
2056  else
2057  {
2058  hSurface = (HANDLE)pSurface->hDDSurface;
2059  }
2060 
2061  /* Call the API */
2062  return (HANDLE)NtGdiDdGetDxHandle(hDD, hSurface, bRelease);
2063 }
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdGetDxHandle(_In_opt_ HANDLE hDirectDraw, _In_opt_ HANDLE hSurface, _In_ BOOL bRelease)
#define GetDdHandle(Handle)
Definition: gdientry.c:22
smooth NULL
Definition: ftsmooth.c:416
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
PVOID HANDLE
Definition: typedefs.h:71

◆ DdGetFlipStatus()

DWORD WINAPI DdGetFlipStatus ( LPDDHAL_GETFLIPSTATUSDATA  GetFlipStatus)

Definition at line 177 of file gdientry.c.

178 {
179  /* Call win32k */
180  return NtGdiDdGetFlipStatus((HANDLE)GetFlipStatus->lpDDSurface->hDDSurface,
181  (PDD_GETFLIPSTATUSDATA)GetFlipStatus);
182 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1773
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetFlipStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETFLIPSTATUSDATA puGetFlipStatusData)

Referenced by DdQueryDirectDrawObject().

◆ DdGetScanLine()

DWORD WINAPI DdGetScanLine ( LPDDHAL_GETSCANLINEDATA  pGetScanLine)

Definition at line 566 of file gdientry.c.

567 {
568  /* Call win32k */
569  return NtGdiDdGetScanLine(GetDdHandle(pGetScanLine->lpDD->hDD),
570  (PDD_GETSCANLINEDATA)pGetScanLine);
571 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetScanLine(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETSCANLINEDATA puGetScanLineData)
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1820

Referenced by DdQueryDirectDrawObject().

◆ DdLock()

DWORD WINAPI DdLock ( LPDDHAL_LOCKDATA  Lock)

Definition at line 133 of file gdientry.c.

134 {
135 
136  /* Call win32k */
137  return NtGdiDdLock((HANDLE)Lock->lpDDSurface->hDDSurface,
139  (HANDLE)Lock->lpDDSurface->hDC);
140 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLock(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData, _In_ HDC hdcClip)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75

Referenced by DdQueryDirectDrawObject().

◆ DdLockD3D()

DWORD WINAPI DdLockD3D ( LPDDHAL_LOCKDATA  Lock)

Definition at line 1366 of file gdientry.c.

1367 {
1368 
1369  /* Call win32k */
1370  return NtGdiDdLockD3D((HANDLE)Lock->lpDDSurface->hDDSurface, (PDD_LOCKDATA)Lock);
1371 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLockD3D(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75

Referenced by DdQueryDirectDrawObject().

◆ DdQueryDirectDrawObject()

BOOL WINAPI DdQueryDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
LPDDHALINFO  pHalInfo,
LPDDHAL_DDCALLBACKS  pDDCallbacks,
LPDDHAL_DDSURFACECALLBACKS  pDDSurfaceCallbacks,
LPDDHAL_DDPALETTECALLBACKS  pDDPaletteCallbacks,
LPD3DHAL_CALLBACKS  pD3dCallbacks,
LPD3DHAL_GLOBALDRIVERDATA  pD3dDriverData,
LPDDHAL_DDEXEBUFCALLBACKS  pD3dBufferCallbacks,
LPDDSURFACEDESC  pD3dTextureFormats,
LPDWORD  pdwFourCC,
LPVIDMEM  pvmList 
)

Definition at line 1508 of file gdientry.c.

1519 {
1520  PVIDEOMEMORY VidMemList = NULL;
1521  DD_HALINFO HalInfo;
1522  D3DNTHAL_CALLBACKS D3dCallbacks;
1523  D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
1524  DD_D3DBUFCALLBACKS D3dBufferCallbacks;
1525  DWORD CallbackFlags[3];
1526  DWORD dwNumHeaps=0, FourCCs=0;
1527  DWORD Flags;
1528  BOOL retVal = TRUE;
1529 
1530  /* Clear the structures */
1531  RtlZeroMemory(&HalInfo, sizeof(DD_HALINFO));
1532  RtlZeroMemory(&D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS));
1533  RtlZeroMemory(&D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
1534  RtlZeroMemory(&D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
1535  RtlZeroMemory(CallbackFlags, sizeof(DWORD)*3);
1536 
1537  /* Note : XP always alloc 24*sizeof(VIDEOMEMORY) of pvmlist so we change it to it */
1538  if ( (pvmList != NULL) &&
1539  (pHalInfo->vmiData.dwNumHeaps != 0) )
1540  {
1541  VidMemList = (PVIDEOMEMORY) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(VIDEOMEMORY) * 24 ) * pHalInfo->vmiData.dwNumHeaps);
1542  }
1543 
1544 
1545  /* Do the query */
1546  if (!NtGdiDdQueryDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1547  &HalInfo,
1548  CallbackFlags,
1549  &D3dCallbacks,
1550  &D3dDriverData,
1551  &D3dBufferCallbacks,
1553  &dwNumHeaps,
1554  VidMemList,
1555  &FourCCs,
1556  pdwFourCC))
1557  {
1558  /* We failed, free the memory and return */
1559  retVal = FALSE;
1560  goto cleanup;
1561  }
1562 
1563  /* Clear the incoming pointer */
1564  RtlZeroMemory(pHalInfo, sizeof(DDHALINFO));
1565 
1566  /* Convert all the data */
1567  pHalInfo->dwSize = sizeof(DDHALINFO);
1568  pHalInfo->lpDDCallbacks = pDDCallbacks;
1571 
1572  /* Check for NT5+ D3D Data */
1573  if ( (D3dCallbacks.dwSize != 0) &&
1574  (D3dDriverData.dwSize != 0) )
1575  {
1576  /* Write these down */
1579 
1580  /* Check for Buffer Callbacks */
1581  if (D3dBufferCallbacks.dwSize)
1582  {
1583  /* Write this one too */
1585  }
1586  }
1587 
1588  /* Continue converting the rest */
1589  pHalInfo->vmiData.dwFlags = HalInfo.vmiData.dwFlags;
1590  pHalInfo->vmiData.dwDisplayWidth = HalInfo.vmiData.dwDisplayWidth;
1591  pHalInfo->vmiData.dwDisplayHeight = HalInfo.vmiData.dwDisplayHeight;
1592  pHalInfo->vmiData.lDisplayPitch = HalInfo.vmiData.lDisplayPitch;
1593  pHalInfo->vmiData.fpPrimary = 0;
1594 
1595  RtlCopyMemory( &pHalInfo->vmiData.ddpfDisplay,
1596  &HalInfo.vmiData.ddpfDisplay,
1597  sizeof(DDPIXELFORMAT));
1598 
1599  pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
1600  pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
1601  pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
1602  pHalInfo->vmiData.dwZBufferAlign = HalInfo.vmiData.dwZBufferAlign;
1603  pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
1604 
1605  pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
1606  pHalInfo->vmiData.pvmList = pvmList;
1607 
1608  RtlCopyMemory( &pHalInfo->ddCaps,
1609  &HalInfo.ddCaps,
1610  sizeof(DDCORECAPS ));
1611 
1612  pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
1613  pHalInfo->lpdwFourCC = pdwFourCC;
1614 
1615  /* always force rope 0x1000 for hal it mean only source copy is supported */
1616  pHalInfo->ddCaps.dwRops[6] = 0x1000;
1617 
1618  /* Set the HAL flags what ReactX got from the driver
1619  * Windows XP force setting DDHALINFO_GETDRIVERINFOSET if the driver does not set it
1620  * and ReactX doing same to keep compatible with drivers, but the driver are
1621  * force support DdGetDriverInfo acoriding MSDN but it seam some driver do not set
1622  * this flag even it is being supported. that is mean. It is small hack to keep
1623  * bad driver working, that trust this is always being setting by it self at end
1624  */
1626  pHalInfo->GetDriverInfo = (LPDDHAL_GETDRIVERINFO) DdGetDriverInfo;
1627 
1628  /* Now check if we got any DD callbacks */
1629  if (pDDCallbacks)
1630  {
1631  /* Zero the structure */
1634 
1635  /* Set the flags for this structure
1636  * Windows XP force setting DDHAL_CB32_CREATESURFACE if the driver does not set it
1637  * and ReactX doing same to keep compatible with drivers, but the driver are
1638  * force support pDDCallbacks acoriding MSDN but it seam some driver do not set
1639  * this flag even it is being supported. that is mean. It is small hack to keep
1640  * bad driver working, that trust this is always being setting by it self at end
1641  */
1642  Flags = (CallbackFlags[0] & ~DDHAL_CB32_CREATESURFACE) | DDHAL_CB32_CREATESURFACE;
1644 
1645  /* Write the always-on functions */
1646  pDDCallbacks->CreateSurface = DdCreateSurface;
1647 
1648  /* Now write the pointers, if applicable */
1650  {
1651  pDDCallbacks->WaitForVerticalBlank = DdWaitForVerticalBlank;
1652  }
1654  {
1655  pDDCallbacks->CanCreateSurface = DdCanCreateSurface;
1656  }
1658  {
1659  pDDCallbacks->GetScanLine = DdGetScanLine;
1660  }
1661  }
1662 
1663  /* Check for DD Surface Callbacks */
1664  if (pDDSurfaceCallbacks)
1665  {
1666  /* Zero the structures */
1669 
1670  /* Set the flags for this structure
1671  * Windows XP force setting DDHAL_SURFCB32_LOCK, DDHAL_SURFCB32_UNLOCK,
1672  * DDHAL_SURFCB32_SETCOLORKEY, DDHAL_SURFCB32_DESTROYSURFACE if the driver
1673  * does not set it and ReactX doing same to keep compatible with drivers,
1674  * but the driver are force support pDDSurfaceCallbacks acoriding MSDN but it seam
1675  * some driver do not set this flag even it is being supported. that is mean.
1676  * It is small hack to keep bad driver working, that trust this is always being
1677  * setting by it self at end
1678  */
1679 
1680  Flags = (CallbackFlags[1] & ~(DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
1684 
1686 
1687  /* Write the always-on functions */
1688  pDDSurfaceCallbacks->Lock = DdLock;
1689  pDDSurfaceCallbacks->Unlock = DdUnlock;
1690  pDDSurfaceCallbacks->SetColorKey = DdSetColorKey;
1691  pDDSurfaceCallbacks->DestroySurface = DdDestroySurface;
1692 
1693  /* Write the optional ones */
1694  if (Flags & DDHAL_SURFCB32_FLIP)
1695  {
1696  pDDSurfaceCallbacks->Flip = DdFlip;
1697  }
1698  if (Flags & DDHAL_SURFCB32_BLT)
1699  {
1700  pDDSurfaceCallbacks->Blt = DdBlt;
1701  }
1703  {
1704  pDDSurfaceCallbacks->GetBltStatus = DdGetBltStatus;
1705  }
1707  {
1708  pDDSurfaceCallbacks->GetFlipStatus = DdGetFlipStatus;
1709  }
1711  {
1712  pDDSurfaceCallbacks->UpdateOverlay = DdUpdateOverlay;
1713  }
1715  {
1716  pDDSurfaceCallbacks->SetOverlayPosition = DdSetOverlayPosition;
1717  }
1719  {
1720  pDDSurfaceCallbacks->AddAttachedSurface = DdAddAttachedSurface;
1721  }
1722  }
1723 
1724  /* Check for DD Palette Callbacks, This interface are dead for user mode,
1725  * only what it can support are being report back.
1726  */
1727  if (pDDPaletteCallbacks)
1728  {
1729  /* Zero the struct */
1731 
1732  /* Write the header */
1734  pDDPaletteCallbacks->dwFlags = CallbackFlags[2];
1735  }
1736 
1737  if (pD3dCallbacks)
1738  {
1739  /* Zero the struct */
1741 
1742  /* Check if we have one */
1743  if (D3dCallbacks.dwSize)
1744  {
1745  /* Write the header */
1747 
1748  /* Now check for each callback */
1749  if (D3dCallbacks.ContextCreate)
1750  {
1752  }
1753  if (D3dCallbacks.ContextDestroy)
1754  {
1756  }
1757  if (D3dCallbacks.ContextDestroyAll)
1758  {
1760  }
1761  }
1762  }
1763 
1764  /* Check for D3D Driver Data */
1765  if (pD3dDriverData)
1766  {
1767  /* Copy the struct */
1768  RtlMoveMemory(pD3dDriverData, &D3dDriverData, sizeof(D3DHAL_GLOBALDRIVERDATA));
1769 
1770  /* Write the pointer to the texture formats */
1771  pD3dDriverData->lpTextureFormats = pD3dTextureFormats;
1772  }
1773 
1774  /* Check for D3D Buffer Callbacks */
1775  if (pD3dBufferCallbacks)
1776  {
1777  /* Zero the struct */
1779 
1780  if ( D3dBufferCallbacks.dwSize)
1781  {
1782  pD3dBufferCallbacks->dwSize = D3dBufferCallbacks.dwSize;
1783 
1784  pD3dBufferCallbacks->dwFlags = D3dBufferCallbacks.dwFlags;
1785  if ( D3dBufferCallbacks.CanCreateD3DBuffer)
1786  {
1788  }
1789 
1790  if (D3dBufferCallbacks.CreateD3DBuffer)
1791  {
1793  }
1794 
1795  if ( D3dBufferCallbacks.DestroyD3DBuffer )
1796  {
1798  }
1799 
1800  if ( D3dBufferCallbacks.LockD3DBuffer )
1801  {
1803  }
1804 
1805  if ( D3dBufferCallbacks.UnlockD3DBuffer )
1806  {
1808  }
1809 
1810  }
1811  }
1812 
1813  /* FIXME VidMemList */
1814 
1815 cleanup:
1816  if (VidMemList)
1817  {
1818  HeapFree(GetProcessHeap(), 0, VidMemList);
1819  }
1820 
1821  return retVal;
1822 }
DWORD dwSize
Definition: ddrawi.h:607
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
DWORD(PASCAL * LPDDHALEXEBUFCB_DESTROYEXEBUF)(LPDDHAL_DESTROYSURFACEDATA)
Definition: ddrawi.h:424
struct _DDHAL_DDPALETTECALLBACKS DDHAL_DDPALETTECALLBACKS
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdQueryDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Out_ PDD_HALINFO pHalInfo, _Out_writes_(3) DWORD *pCallBackFlags, _Out_opt_ LPD3DNTHAL_CALLBACKS puD3dCallbacks, _Out_opt_ LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, _Out_opt_ PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, _Out_opt_ LPDDSURFACEDESC puD3dTextureFormats, _Out_ DWORD *puNumHeaps, _Out_opt_ VIDEOMEMORY *puvmList, _Out_ DWORD *puNumFourCC, _Out_opt_ DWORD *puFourCC)
struct _DDHALINFO DDHALINFO
LPDDHALINFO LPDDHAL_DDCALLBACKS pDDCallbacks
Definition: main.h:38
DWORD dwFlags
Definition: ddrawint.h:1128
DDNTCORECAPS ddCaps
Definition: ddrawint.h:1126
VIDMEMINFO vmiData
Definition: ddrawi.h:611
DWORD dwDisplayHeight
Definition: ddrawint.h:114
DWORD dwDisplayWidth
Definition: ddrawint.h:113
DWORD(PASCAL * LPDDHALEXEBUFCB_UNLOCKEXEBUF)(LPDDHAL_UNLOCKDATA)
Definition: ddrawi.h:426
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData
Definition: main.h:38
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroyAll(_Out_ LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcdad)
DWORD(PASCAL * LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA)
Definition: ddrawi.h:593
#define DDHAL_SURFCB32_UPDATEOVERLAY
Definition: ddrawi.h:684
DWORD dwAlphaAlign
Definition: ddrawint.h:121
DWORD WINAPI DdCanCreateD3DBuffer(LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
Definition: gdientry.c:1256
struct _DDHAL_DDCALLBACKS DDHAL_DDCALLBACKS
#define GetDdHandle(Handle)
Definition: gdientry.c:22
#define DDHAL_CB32_CANCREATESURFACE
Definition: ddrawi.h:658
DWORD(PASCAL * LPD3DHAL_CONTEXTCREATECB)(LPD3DHAL_CONTEXTCREATEDATA)
Definition: d3dhal.h:135
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks
Definition: main.h:38
#define DDHAL_SURFCB32_FLIP
Definition: ddrawi.h:675
DWORD WINAPI DdDestroyD3DBuffer(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:1347
LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks
Definition: ddrawi.h:610
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
DWORD dwTextureAlign
Definition: ddrawint.h:119
#define DDHAL_SURFCB32_SETCOLORKEY
Definition: ddrawi.h:680
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define DDHAL_SURFCB32_GETFLIPSTATUS
Definition: ddrawi.h:683
DWORD WINAPI DdLock(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:133
#define DDHAL_SURFCB32_DESTROYSURFACE
Definition: ddrawi.h:674
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DDHAL_SURFCB32_BLT
Definition: ddrawi.h:679
DWORD WINAPI DdLockD3D(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:1366
DWORD dwZBufferAlign
Definition: ddrawint.h:120
#define DDHAL_SURFCB32_LOCK
Definition: ddrawi.h:677
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY * pvmList
Definition: winddi.h:4226
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI DdCreateSurface(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:281
struct _VIDEOMEMORY VIDEOMEMORY
DWORD WINAPI DdSetColorKey(LPDDHAL_SETCOLORKEYDATA pSetColorKey)
Definition: gdientry.c:552
LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks
Definition: ddrawi.h:609
ULONG_PTR lpD3DHALCallbacks
Definition: ddrawi.h:624
DWORD(PASCAL * LPDDHALEXEBUFCB_LOCKEXEBUF)(LPDDHAL_LOCKDATA)
Definition: ddrawi.h:425
DWORD WINAPI DdSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA SetOverlayPosition)
Definition: gdientry.c:229
#define DDHAL_CB32_GETSCANLINE
Definition: ddrawi.h:660
DWORD(PASCAL * LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA)
Definition: ddrawi.h:422
ULONG_PTR lpD3DGlobalDriverData
Definition: ddrawi.h:623
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
VIDEOMEMORYINFO vmiData
Definition: ddrawint.h:1125
DWORD(PASCAL * LPDDHALEXEBUFCB_CREATEEXEBUF)(LPDDHAL_CREATESURFACEDATA)
Definition: ddrawi.h:423
DWORD WINAPI DdGetBltStatus(LPDDHAL_GETBLTSTATUSDATA GetBltStatus)
Definition: gdientry.c:163
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DDHALINFO_GETDRIVERINFOSET
Definition: ddrawi.h:667
DWORD dwFlags
Definition: ddrawi.h:619
DWORD WINAPI DdGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA GetFlipStatus)
Definition: gdientry.c:177
_Out_ DD_HALINFO * pHalInfo
Definition: winddi.h:4226
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYCB)(LPD3DHAL_CONTEXTDESTROYDATA)
Definition: d3dhal.h:136
BOOL WINAPI D3dContextCreate(LPD3DHAL_CONTEXTCREATEDATA pdcci)
Definition: gdientry.c:1234
DWORD WINAPI DdGetScanLine(LPDDHAL_GETSCANLINEDATA pGetScanLine)
Definition: gdientry.c:566
DWORD WINAPI DdDestroySurface(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:71
LONG lDisplayPitch
Definition: ddrawint.h:115
DWORD WINAPI DdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA WaitForVerticalBlank)
Definition: gdientry.c:244
DWORD dwRops[DD_ROP_SPACE]
Definition: ddrawint.h:1087
DWORD WINAPI DdUnlockD3D(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:1380
DWORD WINAPI DdFlip(LPDDHAL_FLIPDATA Flip)
Definition: gdientry.c:96
#define DDHAL_SURFCB32_SETOVERLAYPOSITION
Definition: ddrawi.h:685
DWORD WINAPI DdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
Definition: gdientry.c:260
#define DDHAL_SURFCB32_GETBLTSTATUS
Definition: ddrawi.h:682
struct _VIDEOMEMORY * PVIDEOMEMORY
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA)
Definition: d3dhal.h:137
DWORD dwOffscreenAlign
Definition: ddrawint.h:117
LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks
Definition: ddrawi.h:625
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS LPDDSURFACEDESC pD3dTextureFormats
Definition: main.h:38
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY _Out_ DWORD _Out_ DWORD * pdwFourCC
Definition: winddi.h:4226
DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
Definition: gdientry.c:898
DWORD WINAPI DdUnlock(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:149
#define DDHAL_CB32_WAITFORVERTICALBLANK
Definition: ddrawi.h:657
DWORD WINAPI DdAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA Attach)
Definition: gdientry.c:35
DWORD WINAPI DdBlt(LPDDHAL_BLTDATA Blt)
Definition: gdientry.c:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
struct _DDHAL_DDSURFACECALLBACKS DDHAL_DDSURFACECALLBACKS
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks
Definition: main.h:38
DWORD WINAPI DdUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA UpdateOverlay)
Definition: gdientry.c:191
#define DDHAL_SURFCB32_ADDATTACHEDSURFACE
Definition: ddrawi.h:681
#define DDHAL_CB32_CREATESURFACE
Definition: ddrawi.h:654
DDPIXELFORMAT ddpfDisplay
Definition: ddrawint.h:116
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
char * cleanup(char *str)
Definition: wpickclick.c:99
DWORD dwFlags
Definition: ddrawi.h:217
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS pD3dCallbacks
Definition: main.h:38
DWORD WINAPI DdCreateD3DBuffer(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:1278
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks
Definition: main.h:38
#define DDHAL_SURFCB32_UNLOCK
Definition: ddrawi.h:678
struct _DDHAL_DDEXEBUFCALLBACKS DDHAL_DDEXEBUFCALLBACKS
#define HeapFree(x, y, z)
Definition: compat.h:394
DWORD dwOverlayAlign
Definition: ddrawint.h:118
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroy(_In_ LPD3DNTHAL_CONTEXTDESTROYDATA pdcdd)

◆ DdQueryDisplaySettingsUniqueness()

ULONG WINAPI DdQueryDisplaySettingsUniqueness ( VOID  )

Definition at line 2031 of file gdientry.c.

2032 {
2034 }
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
Definition: misc.c:34

◆ DdReenableDirectDrawObject()

BOOL WINAPI DdReenableDirectDrawObject ( LPDDRAWI_DIRECTDRAW_GBL  pDirectDrawGlobal,
BOOL pbNewMode 
)

Definition at line 1967 of file gdientry.c.

1969 {
1970  /* Call win32k directly */
1971  return NtGdiDdReenableDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1972  pbNewMode);
1973 }
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReenableDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Inout_ BOOL *pubNewMode)
#define GetDdHandle(Handle)
Definition: gdientry.c:22

◆ DdReleaseDC()

BOOL WINAPI DdReleaseDC ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal)

Definition at line 1937 of file gdientry.c.

1938 {
1939  /* Call win32k directly */
1940  return NtGdiDdReleaseDC((HANDLE) pSurfaceLocal->hDDSurface);
1941 }
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReleaseDC(_In_ HANDLE hSurface)

◆ DdResetVisrgn()

BOOL WINAPI DdResetVisrgn ( LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceLocal,
HWND  hWnd 
)

Definition at line 1909 of file gdientry.c.

1911 {
1912  /* Call win32k directly */
1913  return NtGdiDdResetVisrgn((HANDLE) pSurfaceLocal->hDDSurface, hWnd);
1914 }
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdResetVisrgn(_In_ HANDLE hSurface, _In_ HWND hwnd)
HWND hWnd
Definition: settings.c:17

◆ DdSetColorKey()

DWORD WINAPI DdSetColorKey ( LPDDHAL_SETCOLORKEYDATA  pSetColorKey)

Definition at line 552 of file gdientry.c.

553 {
554  /* Call win32k */
555  return NtGdiDdSetColorKey((HANDLE)pSetColorKey->lpDDSurface->hDDSurface,
556  (PDD_SETCOLORKEYDATA)pSetColorKey);
557 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetColorKey(_In_ HANDLE hSurface, _Inout_ PDD_SETCOLORKEYDATA puSetColorKeyData)
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1851

Referenced by DdQueryDirectDrawObject().

◆ DdSetExclusiveMode()

DWORD WINAPI DdSetExclusiveMode ( LPDDHAL_SETEXCLUSIVEMODEDATA  pDdSetExclusiveMode)

Definition at line 878 of file gdientry.c.

879 {
880  return NtGdiDdSetExclusiveMode( GetDdHandle(pDdSetExclusiveMode->lpDD->hDD), (PDD_SETEXCLUSIVEMODEDATA) &pDdSetExclusiveMode);
881 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:801
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetExclusiveMode(_In_ HANDLE hDirectDraw, _Inout_ PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData)

Referenced by DdGetDriverInfo().

◆ DdSetGammaRamp()

BOOL WINAPI DdSetGammaRamp ( LPDDRAWI_DIRECTDRAW_LCL  pDDraw,
HDC  hdc,
LPVOID  lpGammaRamp 
)

Definition at line 2072 of file gdientry.c.

2075 {
2076  /* Call win32k directly */
2077  return NtGdiDdSetGammaRamp(GetDdHandle(pDDraw->lpGbl->hDD),
2078  hdc,
2079  lpGammaRamp);
2080 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
HDC hdc
Definition: main.c:9
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdSetGammaRamp(_In_ HANDLE hDirectDraw, _In_ HDC hdc, _In_reads_bytes_(sizeof(GAMMARAMP)) LPVOID lpGammaRamp)

◆ DdSetOverlayPosition()

DWORD WINAPI DdSetOverlayPosition ( LPDDHAL_SETOVERLAYPOSITIONDATA  SetOverlayPosition)

Definition at line 229 of file gdientry.c.

230 {
231  /* Call win32k */
232  return NtGdiDdSetOverlayPosition( (HANDLE)SetOverlayPosition->lpDDSrcSurface->hDDSurface,
233  (HANDLE)SetOverlayPosition->lpDDDestSurface->hDDSurface,
234  (PDD_SETOVERLAYPOSITIONDATA) SetOverlayPosition);
235 }
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1860
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetOverlayPosition(_In_ HANDLE hSurfaceSource, _In_ HANDLE hSurfaceDestination, _Inout_ PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData)
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1861

Referenced by DdQueryDirectDrawObject().

◆ DdUnattachSurface()

VOID WINAPI DdUnattachSurface ( LPDDRAWI_DDRAWSURFACE_LCL  pSurface,
LPDDRAWI_DDRAWSURFACE_LCL  pSurfaceAttached 
)

Definition at line 2016 of file gdientry.c.

2018 {
2019  /* Call win32k */
2020  NtGdiDdUnattachSurface((HANDLE)pSurface->hDDSurface,
2021  (HANDLE)pSurfaceAttached->hDDSurface);
2022 }
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiDdUnattachSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached)
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481

◆ DdUnlock()

DWORD WINAPI DdUnlock ( LPDDHAL_UNLOCKDATA  Unlock)

Definition at line 149 of file gdientry.c.

150 {
151  /* Call win32k */
152  return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
154 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUnlock(_In_ HANDLE hSurface, _Inout_ PDD_UNLOCKDATA puUnlockData)

Referenced by DdQueryDirectDrawObject().

◆ DdUnlockD3D()

DWORD WINAPI DdUnlockD3D ( LPDDHAL_UNLOCKDATA  Unlock)

Definition at line 1380 of file gdientry.c.

1381 {
1382  /* Call win32k */
1383  return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
1385 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUnlock(_In_ HANDLE hSurface, _Inout_ PDD_UNLOCKDATA puUnlockData)

Referenced by DdQueryDirectDrawObject().

◆ DdUpdateOverlay()

DWORD WINAPI DdUpdateOverlay ( LPDDHAL_UPDATEOVERLAYDATA  UpdateOverlay)

Definition at line 191 of file gdientry.c.

192 {
193 
194  /* We have to handle this manually here */
195  if (UpdateOverlay->dwFlags & DDOVER_KEYDEST)
196  {
197  /* Use the override */
198  UpdateOverlay->dwFlags &= ~DDOVER_KEYDEST;
199  UpdateOverlay->dwFlags |= DDOVER_KEYDESTOVERRIDE;
200 
201  /* Set the overlay */
202  UpdateOverlay->overlayFX.dckDestColorkey =
203  UpdateOverlay->lpDDDestSurface->ddckCKDestOverlay;
204  }
205  if (UpdateOverlay->dwFlags & DDOVER_KEYSRC)
206  {
207  /* Use the override */
208  UpdateOverlay->dwFlags &= ~DDOVER_KEYSRC;
209  UpdateOverlay->dwFlags |= DDOVER_KEYSRCOVERRIDE;
210 
211  /* Set the overlay */
212  UpdateOverlay->overlayFX.dckSrcColorkey =
213  UpdateOverlay->lpDDSrcSurface->ddckCKSrcOverlay;
214  }
215 
216  /* Call win32k */
217  return NtGdiDdUpdateOverlay((HANDLE)UpdateOverlay->lpDDDestSurface->hDDSurface,
218  (HANDLE)UpdateOverlay->lpDDSrcSurface->hDDSurface,
219  (PDD_UPDATEOVERLAYDATA)UpdateOverlay);
220 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUpdateOverlay(_In_ HANDLE hSurfaceDestination, _In_ HANDLE hSurfaceSource, _Inout_ PDD_UPDATEOVERLAYDATA puUpdateOverlayData)
DDOVERLAYFX overlayFX
Definition: ddrawi.h:1875
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1870
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1872
#define DDOVER_KEYDEST
Definition: ddraw.h:604
#define DDOVER_KEYDESTOVERRIDE
Definition: ddraw.h:605
DDCOLORKEY dckDestColorkey
Definition: ddraw.h:1388
DDCOLORKEY dckSrcColorkey
Definition: ddraw.h:1389
#define DDOVER_KEYSRC
Definition: ddraw.h:606
#define DDOVER_KEYSRCOVERRIDE
Definition: ddraw.h:607

Referenced by DdQueryDirectDrawObject().

◆ DdWaitForVerticalBlank()

DWORD WINAPI DdWaitForVerticalBlank ( LPDDHAL_WAITFORVERTICALBLANKDATA  WaitForVerticalBlank)

Definition at line 244 of file gdientry.c.

245 {
246  /* Call win32k */
248  WaitForVerticalBlank->lpDD->hDD),
250  WaitForVerticalBlank);
251 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1881
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdWaitForVerticalBlank(_In_ HANDLE hDirectDraw, _Inout_ PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)

Referenced by DdQueryDirectDrawObject().

◆ DvpCanCreateVideoPort()

DWORD WINAPI DvpCanCreateVideoPort ( LPDDHAL_CANCREATEVPORTDATA  pDvdCanCreateVideoPort)

Definition at line 673 of file gdientry.c.

674 {
675  return NtGdiDvpCanCreateVideoPort(GetDdHandle(pDvdCanCreateVideoPort->lpDD->lpGbl->hDD), (PDD_CANCREATEVPORTDATA) pDvdCanCreateVideoPort);
676 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:891
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpCanCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATEVPORTDATA puCanCreateVPortData)

Referenced by DdGetDriverInfo().

◆ DvpColorControl()

DWORD WINAPI DvpColorControl ( LPDDHAL_VPORTCOLORDATA  pDvdPortColorControl)

Definition at line 636 of file gdientry.c.

637 {
638  return NtGdiDvpColorControl(pDvdPortColorControl->lpVideoPort->hDDVideoPort, (PDD_VPORTCOLORDATA) pDvdPortColorControl);
639 }
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1001
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpColorControl(_In_ HANDLE hVideoPort, _Inout_ PDD_VPORTCOLORDATA puVPortColorData)

Referenced by DdGetDriverInfo().

◆ DvpCreateVideoPort()

BOOL WINAPI DvpCreateVideoPort ( LPDDHAL_CREATEVPORTDATA  pDvdCreatePort)

Definition at line 581 of file gdientry.c.

582 {
583  pDvdCreatePort->lpVideoPort->hDDVideoPort =
584  NtGdiDvpCreateVideoPort(GetDdHandle(pDvdCreatePort->lpDD->lpGbl->hDD),
585  (PDD_CREATEVPORTDATA) pDvdCreatePort);
586 
587  return TRUE;
588 }
#define TRUE
Definition: types.h:120
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDvpCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CREATEVPORTDATA puCreateVPortData)
#define GetDdHandle(Handle)
Definition: gdientry.c:22
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:900
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:898

Referenced by DdGetDriverInfo().

◆ DvpDestroyVideoPort()

DWORD WINAPI DvpDestroyVideoPort ( LPDDHAL_DESTROYVPORTDATA  pDvdDestoryPort)

Definition at line 597 of file gdientry.c.

598 {
599  return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort, (PDD_DESTROYVPORTDATA)pDvdDestoryPort);
600 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpDestroyVideoPort(_In_ HANDLE hVideoPort, _Inout_ PDD_DESTROYVPORTDATA puDestroyVPortData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:956

Referenced by DdGetDriverInfo().

◆ DvpFlipVideoPort()

DWORD WINAPI DvpFlipVideoPort ( LPDDHAL_FLIPVPORTDATA  pDvdPortFlip)

Definition at line 609 of file gdientry.c.

610 {
611  return NtGdiDvpFlipVideoPort(pDvdPortFlip->lpVideoPort->hDDVideoPort,
612  (HANDLE)pDvdPortFlip->lpSurfCurr->hDDSurface,
613  (HANDLE)pDvdPortFlip->lpSurfTarg->hDDSurface,
614  (PDD_FLIPVPORTDATA) pDvdPortFlip);
615 }
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:1012
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpFlipVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE hDDSurfaceCurrent, _In_ HANDLE hDDSurfaceTarget, _Inout_ PDD_FLIPVPORTDATA puFlipVPortData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1010
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:1011

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortBandwidth()

DWORD WINAPI DvpGetVideoPortBandwidth ( LPDDHAL_GETVPORTBANDWIDTHDATA  pDvdPortBandWidth)

Definition at line 624 of file gdientry.c.

625 {
626  return NtGdiDvpGetVideoPortBandwidth(pDvdPortBandWidth->lpVideoPort->hDDVideoPort, (PDD_GETVPORTBANDWIDTHDATA)pDvdPortBandWidth);
627 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortBandwidth(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTBANDWIDTHDATA puGetVPortBandwidthData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:907

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortConnectInfo()

DWORD WINAPI DvpGetVideoPortConnectInfo ( LPDDHAL_GETVPORTCONNECTDATA  pDvdGetVideoPortInfo)

Definition at line 808 of file gdientry.c.

809 {
810  return NtGdiDvpGetVideoPortConnectInfo( GetDdHandle( pDvdGetVideoPortInfo->lpDD->lpGbl->hDD) , (PDD_GETVPORTCONNECTDATA) pDvdGetVideoPortInfo);
811 }
#define GetDdHandle(Handle)
Definition: gdientry.c:22
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortConnectInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTCONNECTDATA puGetVPortConnectData)
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:1018

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortField()

DWORD WINAPI DvpGetVideoPortField ( LPDDHAL_FLIPVPORTDATA  pDvdGetVideoPortField)

Definition at line 760 of file gdientry.c.

761 {
762  return NtGdiDvpGetVideoPortField(pDvdGetVideoPortField->lpVideoPort->hDDVideoPort, (PDD_GETVPORTFIELDDATA)pDvdGetVideoPortField);
763 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortField(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTFIELDDATA puGetVPortFieldData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1010

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortFlipStatus()

DWORD WINAPI DvpGetVideoPortFlipStatus ( LPDDHAL_GETVPORTFLIPSTATUSDATA  pDvdPortVideoPortFlipStatus)

Definition at line 660 of file gdientry.c.

661 {
662  return NtGdiDvpGetVideoPortFlipStatus(GetDdHandle(pDvdPortVideoPortFlipStatus->lpDD->lpGbl->hDD), (PDD_GETVPORTFLIPSTATUSDATA) pDvdPortVideoPortFlipStatus);
663 
664 }
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:962
#define GetDdHandle(Handle)
Definition: gdientry.c:22
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortFlipStatus(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTFLIPSTATUSDATA puGetVPortFlipStatusData)

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortInputFormats()

DWORD WINAPI DvpGetVideoPortInputFormats ( LPDDHAL_GETVPORTINPUTFORMATDATA  pDvdGetVideoPortInputFormat)

Definition at line 772 of file gdientry.c.

773 {
774  return NtGdiDvpGetVideoPortInputFormats(pDvdGetVideoPortInputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTINPUTFORMATDATA) pDvdGetVideoPortInputFormat);
775 }
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:919
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortInputFormats(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTINPUTFORMATDATA puGetVPortInputFormatData)

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortLine()

DWORD WINAPI DvpGetVideoPortLine ( LPDDHAL_GETVPORTLINEDATA  pDvdGetVideoPortLine)

Definition at line 784 of file gdientry.c.

785 {
786  return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortLine->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortLine);
787 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortLine(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTLINEDATA puGetVPortLineData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:948

Referenced by DdGetDriverInfo().

◆ DvpGetVideoPortOutputFormats()

DWORD WINAPI DvpGetVideoPortOutputFormats ( LPDDHAL_GETVPORTLINEDATA  pDvdGetVideoPortOutputFormat)

Definition at line 796 of file gdientry.c.

797 {
798  return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortOutputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortOutputFormat);
799 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortLine(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTLINEDATA puGetVPortLineData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:948

Referenced by DdGetDriverInfo().

◆ DvpGetVideoSignalStatus()

DWORD WINAPI DvpGetVideoSignalStatus ( LPDDHAL_GETVPORTSIGNALDATA  pDvdPortVideoSignalStatus)

Definition at line 648 of file gdientry.c.

649 {
650  return NtGdiDvpGetVideoSignalStatus(pDvdPortVideoSignalStatus->lpVideoPort->hDDVideoPort, (PDD_GETVPORTSIGNALDATA) pDvdPortVideoSignalStatus);
651 }
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:993
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoSignalStatus(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTSIGNALDATA puGetVPortSignalData)

Referenced by DdGetDriverInfo().

◆ DvpUpdateVideoPort()

DWORD WINAPI DvpUpdateVideoPort ( LPDDHAL_UPDATEVPORTDATA  pDvdUpdateVideoPort)

Definition at line 696 of file gdientry.c.

697 {
698  /*
699  * Windows XP limit to max 10 handles of videoport surface and Vbi
700  * ReactOS doing same to keep compatible, if it is more that 10
701  * videoport surface or vbi the stack will be curpted in windows xp
702  * ReactOS safe guard againts that
703  *
704  */
705 
706  HANDLE phSurfaceVideo[10];
707  HANDLE phSurfaceVbi[10];
708 
709  if (pDvdUpdateVideoPort->dwFlags != DDRAWI_VPORTSTOP)
710  {
711  DWORD dwNumAutoflip;
712  DWORD dwNumVBIAutoflip;
713 
714  /* Take copy of lplpDDSurface for the handle value will be modify in dxg */
715  dwNumAutoflip = pDvdUpdateVideoPort->dwNumAutoflip;
716  if ((dwNumAutoflip == 0) &&
717  (pDvdUpdateVideoPort->lplpDDSurface == 0))
718  {
719  dwNumAutoflip++;
720  }
721 
722  if (dwNumAutoflip != 0)
723  {
724  if (dwNumAutoflip>10)
725  {
726  dwNumAutoflip = 10;
727  }
728  memcpy(phSurfaceVideo,pDvdUpdateVideoPort->lplpDDSurface,dwNumAutoflip*sizeof(HANDLE));
729  }
730 
731  /* Take copy of lplpDDVBISurface for the handle value will be modify in dxg */
732  dwNumVBIAutoflip = pDvdUpdateVideoPort->dwNumVBIAutoflip;
733  if ( (dwNumVBIAutoflip == 0) &&
734  (pDvdUpdateVideoPort->lplpDDVBISurface == 0) )
735  {
736  dwNumVBIAutoflip++;
737  }
738 
739  if (dwNumVBIAutoflip != 0)
740  {
741  if (dwNumVBIAutoflip>10)
742  {
743  dwNumVBIAutoflip = 10;
744  }
745  memcpy(phSurfaceVbi,pDvdUpdateVideoPort->lplpDDVBISurface,dwNumVBIAutoflip*sizeof(HANDLE));
746  }
747  }
748 
749  /* Call Win32k */
750  return NtGdiDvpUpdateVideoPort(pDvdUpdateVideoPort->lpVideoPort->hDDVideoPort,phSurfaceVideo,phSurfaceVbi, (PDD_UPDATEVPORTDATA)pDvdUpdateVideoPort);
751 }
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:970
LPDDRAWI_DDRAWSURFACE_INT * lplpDDVBISurface
Definition: ddrawi.h:972
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpUpdateVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE *phSurfaceVideo, _In_ HANDLE *phSurfaceVbi, _Inout_ PDD_UPDATEVPORTDATA puUpdateVPortData)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define DDRAWI_VPORTSTOP
Definition: ddrawi.h:670
LPDDRAWI_DDRAWSURFACE_INT * lplpDDSurface
Definition: ddrawi.h:971

Referenced by DdGetDriverInfo().

◆ DvpWaitForVideoPortSync()

DWORD WINAPI DvpWaitForVideoPortSync ( LPDDHAL_WAITFORVPORTSYNCDATA  pDvdWaitForVideoPortSync)

Definition at line 684 of file gdientry.c.

685 {
686  return NtGdiDvpWaitForVideoPortSync(pDvdWaitForVideoPortSync->lpVideoPort->hDDVideoPort, (PDD_WAITFORVPORTSYNCDATA) pDvdWaitForVideoPortSync);
687 }
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpWaitForVideoPortSync(_In_ HANDLE hVideoPort, _Inout_ PDD_WAITFORVPORTSYNCDATA puWaitForVPortSyncData)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:983

Referenced by DdGetDriverInfo().

Variable Documentation

◆ gcDirectDraw

ULONG gcDirectDraw

Definition at line 20 of file gdientry.c.

Referenced by DdCreateDirectDrawObject(), and DdDeleteDirectDrawObject().

◆ ghDirectDraw

HANDLE ghDirectDraw

Definition at line 19 of file gdientry.c.

Referenced by DdCreateDirectDrawObject(), and DdDeleteDirectDrawObject().