This method of the DirectDraw Class retrieves the DirectDrawSurface object that currently represents the surface memory that the Graphical Device Interface (GDI) is treating as the primary surface.
public DirectDrawSurface getGDISurface();
Returns the DirectDrawSurface object if successful; otherwise, returns null.