EngLockDirectDrawSurface function (winddi.h)

The EngLockDirectDrawSurface function locks the kernel-mode handle of a DirectDraw surface.

Syntax

ENGAPI PDD_SURFACE_LOCAL EngLockDirectDrawSurface(
  [in] HANDLE hSurface
);

Parameters

[in] hSurface

Handle to the surface to be locked.

Return value

EngLockDirectDrawSurface returns a pointer to a DD_SURFACE_LOCAL structure that describes the surface information upon success. Otherwise, it returns a NULL pointer.

Remarks

EngLockDirectDrawSurface allows driver writers to lock DirectDraw surfaces. Locking the handle guarantees synchronized behavior and preserves the handle from being deleted by other threads in the system.

Currently, the driver receives DirectDraw surface handles only from the Direct3D texturing interface. Consequently, only drivers that perform texturing need to lock texture surfaces.

Upon completion of texturing, the driver must release the locked handle by calling EngUnlockDirectDrawSurface.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Universal
Header winddi.h (include Winddi.h)
Library Win32k.lib
DLL Win32k.sys

See also

DD_SURFACE_LOCAL

EngUnlockDirectDrawSurface