Attaches the specified z-buffer surface to this surface.
- lpDDSurface [in]
Address of the IDirectDrawSurface7 interface for the surface to be attached.
If the method succeeds, the return value is DD_OK.
If it fails, the method can return one of the following error values:
AddAttachedSurface increments the reference count of the surface being attached. You can explicitly unattach the surface and decrement its reference count by using the IDirectDrawSurface7::DeleteAttachedSurface method. Unlike complex surfaces that you create with a single call to IDirectDraw7::CreateSurface, surfaces attached with this method are not automatically released. The application must release such surfaces.
You can attach only z-buffer surfaces with this method.