Platform SDK: DirectX

DirectDraw7.CreateSurface

The DirectDraw7.CreateSurface method creates a DirectDrawSurface7 object for this DirectDraw object.

object.CreateSurface( _ 
    dd As DDSURFACEDESC2) As DirectDrawSurface7

Parameters

object
Object expression that resolves to a DirectDraw7 object.
dd
DDSURFACEDESC2 type that describes the requested surface. A DDSCAPS2 type is a member of DDSURFACEDESC2.

Return Values

If the method succeeds, it returns a DirectDrawSurface7 object.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INCOMPATIBLEPRIMARY
DDERR_INVALIDCAPS
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDPIXELFORMAT
DDERR_NOALPHAHW
DDERR_NOCOOPERATIVELEVELSET
DDERR_NODIRECTDRAWHW
DDERR_NOEMULATION
DDERR_NOEXCLUSIVEMODE
DDERR_NOFLIPHW
DDERR_NOMIPMAPHW
DDERR_NOOVERLAYHW
DDERR_NOZBUFFERHW
DDERR_OUTOFMEMORY
DDERR_OUTOFVIDEOMEMORY
DDERR_PRIMARYSURFACEALREADYEXISTS
DDERR_UNSUPPORTEDMODE