DXSFCREATE Enumeration

Enables you to set special properties of DXSurface objects that are created with the IDXSurfaceFactory interface.

Syntax

typedef enum DXSFCREATE
{
    DXSF_FORMAT_IS_CLSID    = ( 1L << 0 ),
    DXSF_NO_LAZY_DDRAW_LOCK = ( 1L << 1 )
} DXSFCREATE;

Elements

DXSF_FORMAT_IS_CLSID
If this flag is set in the dwFlags parameter of the IDXSurfaceFactory::CreateSurface method, the pFormatID parameter is used to create the surface. If this flag is not set, the pFormatID parameter is ignored, and the default value (CLSID_DXSurface) is used. This gives you the option of creating custom DXSurface formats, if desired.
DXSF_NO_LAZY_DDRAW_LOCK
Enables you to deselect "lazy DDraw locking" for the surface.

Remarks

By default, DXSurfaces are locked using a "lazy lock" of an underlying DirectDrawSurface. This technique locks the DirectDrawSurface only the first time the DXSurface is locked, gets the pointer to the DirectDrawSurface, and immediately unlocks it. Subsequent locks increment a counter. Lazy locking improves code performance markedly, but should not be used if other operations on the DirectDrawSurface are occurring.

See Also

IDXSurfaceFactory::CreateSurface

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.