Microsoft DirectX 9.0 |
The EnumAttachedSurfaces method enumerates all the surfaces attached to a given surface.
Syntax
HRESULT EnumAttachedSurfaces(
LPVOID lpContext,
LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback
);
Parameters
lpContext
Application-defined value that is passed to the enumeration method every time it is called.
lpEnumSurfacesCallback
Points to the callback function that will be called for each surface that is attached to this surface. See Remarks.
Return Values
Value | Description |
DD_OK | The method succeeded. |
DDERR_INVALIDOBJECT | DirectDraw received a pointer that was an invalid DirectDraw object. |
DDERR_INVALIDPARAMS | One or more of the input parameters is invalid. |
DDERR_SURFACELOST | Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it. |
Remarks
The callback function passed as lpEnumCallback must have the following syntax:
lpEnumSurfacesCallback(LPDIRECTDRAWSURFACE lpDDSurface,
LPDDSURFACEDESC pDDSurfaceDesc, LPVOID lpContext);
The lpDDSurface parameter points to the surface that is attached to this surface.
The lpDDSurfaceDesc parameter points to a DDSURFACEDESC structure that describes the attached surface.
The lpContext parameter contains the value that was passed in the lpContext parameter of EnumAttachedSurfaces.
The callback function should return one of the following values:
Value | Description |
DDENUMRET_OK | Continue the enumeration. |
DDENUMRET_CANCEL | Stop the enumeration. |
See Also