2#define GetCode(X) printf("%s\n", DDErrorString(X));
8 case DD_OK:
return "DD_OK";
110 return "Unknown Error";
const CHAR * DDErrorString(HRESULT hResult)
#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE
#define DDERR_NOT8BITCOLOR
#define DDERR_NOSTRETCHHW
#define DDERR_NOTAOVERLAYSURFACE
#define DDERR_CANTPAGEUNLOCK
#define DDERR_INVALIDRECT
#define DDERR_NOT4BITCOLORINDEX
#define DDERR_HEIGHTALIGN
#define DDERR_UNSUPPORTEDMODE
#define DDERR_NOOVERLAYDEST
#define DDERR_INVALIDPIXELFORMAT
#define DDERR_VERTICALBLANKINPROGRESS
#define DDERR_NOTFLIPPABLE
#define DDERR_OVERLAYCANTCLIP
#define DDERR_UNSUPPORTEDMASK
#define DDERR_INVALIDCAPS
#define DDERR_INVALIDOBJECT
#define DDERR_INVALIDMODE
#define DDERR_CANNOTATTACHSURFACE
#define DDERR_UNSUPPORTEDFORMAT
#define DDERR_NOZOVERLAYHW
#define DDERR_NOTPAGELOCKED
#define DDERR_SURFACELOST
#define DDERR_NOOVERLAYHW
#define DDERR_NOT4BITCOLOR
#define DDERR_SURFACEALREADYDEPENDENT
#define DDERR_SURFACEISOBSCURED
#define DDERR_NODIRECTDRAWSUPPORT
#define DDERR_INCOMPATIBLEPRIMARY
#define DDERR_EXCLUSIVEMODEALREADYSET
#define DDERR_PALETTEBUSY
#define DDERR_NOCOLORCONVHW
#define DDERR_WASSTILLDRAWING
#define DDERR_HWNDSUBCLASSED
#define DDERR_NOEXCLUSIVEMODE
#define DDERR_OVERLAYNOTVISIBLE
#define DDERR_OUTOFMEMORY
#define DDERR_NOZBUFFERHW
#define DDERR_CANTCREATEDC
#define DDERR_HWNDALREADYSET
#define DDERR_NOPALETTEATTACHED
#define DDERR_NOTINITIALIZED
#define DDERR_CURRENTLYNOTAVAIL
#define DDERR_OUTOFVIDEOMEMORY
#define DDERR_NOCOOPERATIVELEVELSET
#define DDERR_SURFACENOTATTACHED
#define DDERR_DIRECTDRAWALREADYCREATED
#define DDERR_NOCOLORKEYHW
#define DDERR_COLORKEYNOTSET
#define DDERR_UNSUPPORTED
#define DDERR_REGIONTOOSMALL
#define DDERR_TOOBIGWIDTH
#define DDERR_NOPALETTEHW
#define DDERR_INVALIDDIRECTDRAWGUID
#define DDERR_CANTDUPLICATE
#define DDERR_INVALIDCLIPLIST
#define DDERR_NOCLIPPERATTACHED
#define DDERR_IMPLICITLYCREATED
#define DDERR_NOTPALETTIZED
#define DDERR_INVALIDPARAMS
#define DDERR_CANTLOCKSURFACE
#define DDERR_DCALREADYCREATED
#define DDERR_CANTPAGELOCK
#define DDERR_CLIPPERISUSINGHWND
#define DDERR_NOROTATIONHW
#define DDERR_NORASTEROPHW
#define DDERR_LOCKEDSURFACES
#define DDERR_SURFACEALREADYATTACHED
#define DDERR_NOEMULATION
#define DDERR_ALREADYINITIALIZED
#define DDERR_NOTEXTUREHW
#define DDERR_CANNOTDETACHSURFACE
#define DDERR_SURFACEBUSY
#define DDERR_NODIRECTDRAWHW
#define DDERR_INVALIDPOSITION
#define DDERR_TOOBIGHEIGHT
#define DDERR_PRIMARYSURFACEALREADYEXISTS
#define DDERR_INVALIDSURFACETYPE
#define DDERR_BLTFASTCANTCLIP