Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.CreateImageSurface

Creates an image surface.

object.CreateImageSurface( _ 
    Width As Long, _ 
    Height As Long, _ 
    Format As CONST_D3DFORMAT) As Direct3DSurface8

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
Width
Width of the image surface, in pixels.
Height
Height of the image surface, in pixels.
Format
Member of the CONST_D3DFORMAT enumerated type, describing the format of the image surface.

Return Values

A Direct3DSurface8 object, representing the created image surface.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values.

D3DERR_INVALIDCALL
D3DERR_OUTOFVIDEOMEMORY
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

Image surfaces are place holders, they are surfaces that cannot be used in any Microsoft® Direct3D® operations except locking and Direct3DDevice8.CopyRects.

Image surfaces are placed in the D3DPOOL_SYSTEMMEM memory class.