This method of the DirectDrawSurface Class obtains the attached surface that has the specified capabilities.
public DirectDrawSurface getAttachedSurface(int caps);
Returns the DirectDrawSurface object if successful; otherwise, returns null.
caps | A value that specifies the hardware capabilities of the surface. |
Attachments are used to connect multiple DirectDrawSurface objects into complex structures, like the ones needed to support 3D page flipping with z-buffers. This method fails if more than one surface is attached that matches the capabilities requested. In this case, the application must use the enumAttachedSurfaces method to obtain the attached surfaces.