This is a method of the IDirectDrawSurface Interface.
public DirectDrawSurface getAttachedSurface(int caps);