IDirectDrawSurface5::GetAttachedSurface (Windows CE 5.0)

Send Feedback

This method obtains the attached surface that has the specified capabilities and increments the reference count of the retrieved interface.

HRESULT GetAttachedSurface(LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 FAR* lplpDDAttachedSurface);

Parameters

  • lpDDSCaps
    Address of a DDSCAPS2 structure that contains the hardware capabilities of the surface.
  • lplpDDAttachedSurface
    Address of a variable that will contain a pointer to the retrieved surface's IDirectDrawSurface5 interface. The retrieved surface is the one that matches the description according to the lpDDSCaps parameter.

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_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_NOTFOUND
DDERR_SURFACELOST

Remarks

Attachments are used to connect multiple DirectDrawSurface objects into complex structures.

This method fails if more than one surface is attached that matches the capabilities requested. In this case, the application must use the IDirectDrawSurface5::EnumAttachedSurfaces method to obtain the attached surfaces.

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.