The following example shows how to prepare the DDSURFACEDESC2 type members relevant for creating the primary surface.
Dim ddsd As DDSURFACEDESC2
// Tell DirectDraw which members are valid.
ddsd.lFlags = DDSD_CAPS;
// Request a primary surface.
ddsd.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE;
Look at that great VB. And don't forget this great paragraph:
One of the most useful complex surfaces you can create is a Error! Bookmark not defined.. Usually, a flipping chain is made of a Error! Bookmark not defined. and one or more Error! Bookmark not defined.. The DDSCAPS_FLIP flag indicates that a surface is part of a flipping chain. Creating a flipping chain this way requires that you also include the DDSCAPS_COMPLEX flag.
I don't trust that anymore... If the mutts at MS had taken a second to even copy their code into a VB compiler they would've found the majorly obvious syntax errors. Grr. Anyhow, anyone have a solution of some sort?