Hret call failed the call succeeds
DDERRNOEXCLUSIVEMODE
DDERRNOFLIPHW
DDERROUTOFVIDEOMEMORY
DDERRPRIMARYSURFACEALREADYEXISTS
CreateSurface() can explicitly request that a surface is created in a certain type of memory.
This is done by means of the appropriate flags in the associated DDSCAPS2 structure, which is part
not necessary to explicitly enter these values when calling CreateSurface(); in fact, specifying
these parameters generates an error even if they match the ones in the current display mode. In
DDSURFACEDESC2 ddsd;
. . .
ZeroMemory(&ddsd, sizeof(ddsd));
// Now fill in the required members
if (hRet != DD_OK)
return DDInitFailed(hWnd, hRet,
context, which enables you to use GDI graphics in the application, or to lock the surface for direct
access and retrieve its base address and pitch.
in the general Windows API. Its general form is as follows:
HRESULT GetDC( HDC );
DDERRGENERIC
DDERRINVALIDOBJECT