IDirectDrawSurface::DeleteAttachedSurface
HRESULT DeleteAttachedSurface(DWORD dwFlags,
LPDIRECTDRAWSURFACE lpDDSAttachedSurface);
Detaches two attached surfaces. The detached surface is not released.
·Returns DD_OK if successful, or one of the following error values otherwise:
DDERR_INVALIDOBJECT | DDERR_CANNOTDETACHSURFACE |
DDERR_INVALIDPARAMS | DDERR_SURFACENOTATTACHED |
DDERR_SURFACELOST |
dwFlags
This parameter is not used at this time and must be set to 0.
lpDDSAttachedSurface
Address of the DirectDrawSurface structure to be detached. If NULL is passed, all attached surfaces will be detached.
If NULL is passed as the surface to be detached, all attached surfaces will be detached. Implicit attachments, those formed by DirectDraw rather than the IDirectDrawSurface::AddAttachedSurface method, cannot be detached. Detaching surfaces from a flippable chain can alter other surfaces in the chain. If a front buffer is detached from a flippable 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 flippable chain only has two surfaces and they are detached, the chain is destroyed and both surfaces return to their previous designations.