Platform SDK: DirectX

DirectDrawSurface7.DeleteAttachedSurface

The DirectDrawSurface7.DeleteAttachedSurface method detaches two attached surfaces.

object.DeleteAttachedSurface(ddS As DirectDrawSurface7)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
ddS
DirectDrawSurface7 object for the DirectDrawSurface object to be detached. If this parameter is Nothing, all attached surfaces are detached.

Error Codes

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

DDERR_CANNOTDETACHSURFACE
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_SURFACELOST
DDERR_SURFACENOTATTACHED

Remarks

Implicit attachments, those formed by DirectDraw, rather than the DirectDrawSurface7.AddAttachedSurface method, cannot be detached. Detaching surfaces from a flipping chain can alter other surfaces in the chain. If a front buffer is detached from a flipping chain, the next surface in the chain becomes the front buffer, and the following surface becomes the back buffer. If a back buffer is detached from a chain, the following surface becomes a back buffer. If a plain surface is detached from a chain, the chain simply becomes shorter. If a flipping chain has only two surfaces and they are detached, the chain is destroyed, and both surfaces return to their previous designations.

See Also

DirectDrawSurface7.Flip