EngCreateDeviceSurface
The EngCreateDeviceSurface function creates and returns a handle for a device surface that the driver will manage.
HSURF
EngCreateDeviceSurface(
DHSURF dhsurf,
SIZEL sizl,
ULONG iFormatCompat
);
Parameters
- dhsurf
- 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
- 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.
Headers
Declared in winddi.h. Include winddi.h.
Comments
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.
See Also
SURFOBJ, EngAssociateSurface, EngDeleteSurface