Expand Minimize

EngCreateDeviceSurface function

The EngCreateDeviceSurface function creates and returns a handle for a device surface that the driver will manage.

Syntax


HSURF EngCreateDeviceSurface(
  _In_  DHSURF dhsurf,
  _In_  SIZEL sizl,
  ULONG iFormatCompat
);

Parameters

dhsurf [in]

Device handle to the surface to be managed by the device. This handle is passed to the driver when a SURFOBJ structure is passed for input or output.

sizl [in]

Specifies a SIZEL structure that contains the width and height of the surface to be created. The cx and cy members of this structure contain respectively, the surface's width and height, in pixels. A SIZEL structure is identical to a SIZE structure.

iFormatCompat

Specifies the compatible engine format of the device surface being created. This is used by GDI if a temporary buffer is needed to simulate a complicated drawing call.

Return value

The return value is a handle that identifies the surface if the function is successful. Otherwise, it is zero, and an error code is logged.

Remarks

The storage space for the surface can optionally be provided by the driver. The surface should be associated by using EngAssociateSurface. The surface should be deleted when it is no longer needed by using EngDeleteSurface.

Requirements

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Winddi.h (include Winddi.h)

Library

Win32k.lib

DLL

Win32k.sys

See also

SURFOBJ
EngAssociateSurface
EngDeleteSurface

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft