DirectX SDK |
The DirectDrawSurface7.GetAttachedSurface method obtains the attached surface that has the specified capabilities.
object.GetAttachedSurface( _ caps As DDSCAPS2) As DirectDrawSurface7
If the method succeeds, a DirectDrawSurface7 object is returned. The retrieved surface is the one that matches the description, according to the caps parameter.
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_NOTFOUND |
DDERR_SURFACELOST |
Attachments are used to connect multiple DirectDrawSurface objects into complex types, like the ones needed to support 3-D 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 DirectDrawSurface7.GetAttachedSurfaceEnum method to obtain the attached surfaces.
The object returned by a successful function call must be assigned to a DirectDrawSurface7 object variable. For example:
Dim DDrawSurface as DirectDrawSurface7 Set DDrawSurface = object.GetAttachedSurface()