ReactOS  0.4.13-dev-241-g63286c6
eng.c File Reference
#include <dxg_int.h>
Include dependency graph for eng.c:

Go to the source code of this file.

Functions

PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface (HANDLE hDdSurface)
 
BOOL NTAPI DxDdUnlockDirectDrawSurface (PDD_SURFACE_LOCAL pSurface)
 

Function Documentation

◆ DxDdLockDirectDrawSurface()

PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface ( HANDLE  hDdSurface)

Definition at line 15 of file eng.c.

16 {
17  PEDD_SURFACE pEDDSurface = NULL;
18  PDD_SURFACE_LOCAL pSurfacelcl = NULL;
19 
20  pEDDSurface = DdHmgLock(hDdSurface, ObjType_DDSURFACE_TYPE, FALSE);
21  if (pEDDSurface != NULL)
22  {
23  pSurfacelcl = &pEDDSurface->ddsSurfaceLocal;
24  }
25 
26  return pSurfacelcl;
27 }
DD_SURFACE_LOCAL ddsSurfaceLocal
Definition: directxint.h:51
#define ObjType_DDSURFACE_TYPE
Definition: dxg_int.h:57
smooth NULL
Definition: ftsmooth.c:416
PVOID FASTCALL DdHmgLock(HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned)
Definition: ddhmg.c:147

◆ DxDdUnlockDirectDrawSurface()

BOOL NTAPI DxDdUnlockDirectDrawSurface ( PDD_SURFACE_LOCAL  pSurface)

Definition at line 31 of file eng.c.

32 {
33  BOOL retVal = FALSE;
34  //PEDD_SURFACE pEDDSurface = NULL;
35 
36  if (pSurface)
37  {
38  // pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
39  // InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock);
40  retVal = TRUE;
41  }
42 
43  return retVal;
44 }
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481