IDirectDrawSurface5::DeleteAttachedSurface (Windows CE 5.0)

Send Feedback

This method detaches two attached surfaces.

HRESULT DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface);

Parameters

  • dwFlags
    This parameter is currently not used and must be set to zero.
  • lpDDSAttachedSurface
    Address of the IDirectDrawSurface5 interface for the DirectDrawSurface object to be detached. If this parameter is NULL, all attached surfaces are detached.

Return Values

If the method succeeds, the return value is DD_OK.

If the method fails, the return value may be one of the following error values:

DDERR_CANNOTDETACHSURFACE
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_SURFACELOST
DDERR_SURFACENOTATTACHED

Remarks

This method decrements the reference count of the surface being detached. If the reference count of the surface being detached reaches zero, it is lost and removed from memory.

Using AddAttachedSurface or DeleteAttachedSurface on any surface in a flipping chain is not supported. It may work, but it is likely that memory leaks will result. The functions are primarily provided for future expansion. As a workaround, initially create surfaces in flipping chains with the desired number of buffers.

Requirements

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddraw.h.
Link Library: Ddraw.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.