EngCreateDeviceSurface

HSURF EngCreateDeviceSurface(

DHSURF dhsurf,
SIZEL sizl,
ULONG iFormatCompat
);

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

Parameters

dhsurf

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

sizl

Specifies the size, in pixels, of the surface to be created.

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.

Comments

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

See Also

SURFOBJ