ReactOS 0.4.16-dev-297-gc569aee
debug.cpp
Go to the documentation of this file.
1
2#define GetCode(X) printf("%s\n", DDErrorString(X));
3
4const CHAR* DDErrorString (HRESULT hResult)
5{
6 switch (hResult)
7 {
8 case DD_OK: return "DD_OK";
9 case DDERR_ALREADYINITIALIZED: return "DDERR_ALREADYINITIALIZED";
10 case DDERR_CANNOTATTACHSURFACE: return "DDERR_CANNOTATTACHSURFACE";
11 case DDERR_CANNOTDETACHSURFACE: return "DDERR_CANNOTDETACHSURFACE";
12 case DDERR_CURRENTLYNOTAVAIL: return "DDERR_CURRENTLYNOTAVAIL";
13 case DDERR_EXCEPTION: return "DDERR_EXCEPTION";
14 case DDERR_GENERIC: return "DDERR_GENERIC";
15 case DDERR_HEIGHTALIGN: return "DDERR_HEIGHTALIGN";
16 case DDERR_INCOMPATIBLEPRIMARY: return "DDERR_INCOMPATIBLEPRIMARY";
17 case DDERR_INVALIDCAPS: return "DDERR_INVALIDCAPS";
18 case DDERR_INVALIDCLIPLIST: return "DDERR_INVALIDCLIPLIST";
19 case DDERR_INVALIDMODE: return "DDERR_INVALIDMODE";
20 case DDERR_INVALIDOBJECT: return "DDERR_INVALIDOBJECT";
21 case DDERR_INVALIDPARAMS: return "DDERR_INVALIDPARAMS";
22 case DDERR_INVALIDPIXELFORMAT: return "DDERR_INVALIDPIXELFORMAT";
23 case DDERR_INVALIDRECT: return "DDERR_INVALIDRECT";
24 case DDERR_LOCKEDSURFACES: return "DDERR_LOCKEDSURFACES";
25 case DDERR_NO3D: return "DDERR_NO3D";
26 case DDERR_NOALPHAHW: return "DDERR_NOALPHAHW";
27 case DDERR_NOCLIPLIST: return "DDERR_NOCLIPLIST";
28 case DDERR_NOCOLORCONVHW: return "DDERR_NOCOLORCONVHW";
29 case DDERR_NOCOOPERATIVELEVELSET: return "DDERR_NOCOOPERATIVELEVELSET";
30 case DDERR_NOCOLORKEY: return "DDERR_NOCOLORKEY";
31 case DDERR_NOCOLORKEYHW: return "DDERR_NOCOLORKEYHW";
32 case DDERR_NODIRECTDRAWSUPPORT: return "DDERR_NODIRECTDRAWSUPPORT";
33 case DDERR_NOEXCLUSIVEMODE: return "DDERR_NOEXCLUSIVEMODE";
34 case DDERR_NOFLIPHW: return "DDERR_NOFLIPHW";
35 case DDERR_NOGDI: return "DDERR_NOGDI";
36 case DDERR_NOMIRRORHW: return "DDERR_NOMIRRORHW";
37 case DDERR_NOTFOUND: return "DDERR_NOTFOUND";
38 case DDERR_NOOVERLAYHW: return "DDERR_NOOVERLAYHW";
39 case DDERR_NORASTEROPHW: return "DDERR_NORASTEROPHW";
40 case DDERR_NOROTATIONHW: return "DDERR_NOROTATIONHW";
41 case DDERR_NOSTRETCHHW: return "DDERR_NOSTRETCHHW";
42 case DDERR_NOT4BITCOLOR: return "DDERR_NOT4BITCOLOR";
43 case DDERR_NOT4BITCOLORINDEX: return "DDERR_NOT4BITCOLORINDEX";
44 case DDERR_NOT8BITCOLOR: return "DDERR_NOT8BITCOLOR";
45 case DDERR_NOTEXTUREHW: return "DDERR_NOTEXTUREHW";
46 case DDERR_NOVSYNCHW: return "DDERR_NOVSYNCHW";
47 case DDERR_NOZBUFFERHW: return "DDERR_NOZBUFFERHW";
48 case DDERR_NOZOVERLAYHW: return "DDERR_NOZOVERLAYHW";
49 case DDERR_OUTOFCAPS: return "DDERR_OUTOFCAPS";
50 case DDERR_OUTOFMEMORY: return "DDERR_OUTOFMEMORY";
51 case DDERR_OUTOFVIDEOMEMORY: return "DDERR_OUTOFVIDEOMEMORY";
52 case DDERR_OVERLAYCANTCLIP: return "DDERR_OVERLAYCANTCLIP";
53 case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE";
54 case DDERR_PALETTEBUSY: return "DDERR_PALETTEBUSY";
55 case DDERR_COLORKEYNOTSET: return "DDERR_COLORKEYNOTSET";
56 case DDERR_SURFACEALREADYATTACHED: return "DDERR_SURFACEALREADYATTACHED";
57 case DDERR_SURFACEALREADYDEPENDENT: return "DDERR_SURFACEALREADYDEPENDENT";
58 case DDERR_SURFACEBUSY: return "DDERR_SURFACEBUSY";
59 case DDERR_CANTLOCKSURFACE: return "DDERR_CANTLOCKSURFACE";
60 case DDERR_SURFACEISOBSCURED: return "DDERR_SURFACEISOBSCURED";
61 case DDERR_SURFACELOST: return "DDERR_SURFACELOST";
62 case DDERR_SURFACENOTATTACHED: return "DDERR_SURFACENOTATTACHED";
63 case DDERR_TOOBIGHEIGHT: return "DDERR_TOOBIGHEIGHT";
64 case DDERR_TOOBIGSIZE: return "DDERR_TOOBIGSIZE";
65 case DDERR_TOOBIGWIDTH: return "DDERR_TOOBIGWIDTH";
66 case DDERR_UNSUPPORTED: return "DDERR_UNSUPPORTED";
67 case DDERR_UNSUPPORTEDFORMAT: return "DDERR_UNSUPPORTEDFORMAT";
68 case DDERR_UNSUPPORTEDMASK: return "DDERR_UNSUPPORTEDMASK";
69 case DDERR_VERTICALBLANKINPROGRESS: return "DDERR_VERTICALBLANKINPROGRESS";
70 case DDERR_WASSTILLDRAWING: return "DDERR_WASSTILLDRAWING";
71 case DDERR_XALIGN: return "DDERR_XALIGN";
72 case DDERR_INVALIDDIRECTDRAWGUID: return "DDERR_INVALIDDIRECTDRAWGUID";
73 case DDERR_DIRECTDRAWALREADYCREATED: return "DDERR_DIRECTDRAWALREADYCREATED";
74 case DDERR_NODIRECTDRAWHW: return "DDERR_NODIRECTDRAWHW";
75 case DDERR_PRIMARYSURFACEALREADYEXISTS: return "DDERR_PRIMARYSURFACEALREADYEXISTS";
76 case DDERR_NOEMULATION: return "DDERR_NOEMULATION";
77 case DDERR_REGIONTOOSMALL: return "DDERR_REGIONTOOSMALL";
78 case DDERR_CLIPPERISUSINGHWND: return "DDERR_CLIPPERISUSINGHWND";
79 case DDERR_NOCLIPPERATTACHED: return "DDERR_NOCLIPPERATTACHED";
80 case DDERR_NOHWND: return "DDERR_NOHWND";
81 case DDERR_HWNDSUBCLASSED: return "DDERR_HWNDSUBCLASSED";
82 case DDERR_HWNDALREADYSET: return "DDERR_HWNDALREADYSET";
83 case DDERR_NOPALETTEATTACHED: return "DDERR_NOPALETTEATTACHED";
84 case DDERR_NOPALETTEHW: return "DDERR_NOPALETTEHW";
85 case DDERR_BLTFASTCANTCLIP: return "DDERR_BLTFASTCANTCLIP";
86 case DDERR_NOBLTHW: return "DDERR_NOBLTHW";
87 case DDERR_NODDROPSHW: return "DDERR_NODDROPSHW";
88 case DDERR_OVERLAYNOTVISIBLE: return "DDERR_OVERLAYNOTVISIBLE";
89 case DDERR_NOOVERLAYDEST: return "DDERR_NOOVERLAYDEST";
90 case DDERR_INVALIDPOSITION: return "DDERR_INVALIDPOSITION";
91 case DDERR_NOTAOVERLAYSURFACE: return "DDERR_NOTAOVERLAYSURFACE";
92 case DDERR_EXCLUSIVEMODEALREADYSET: return "DDERR_EXCLUSIVEMODEALREADYSET";
93 case DDERR_NOTFLIPPABLE: return "DDERR_NOTFLIPPABLE";
94 case DDERR_CANTDUPLICATE: return "DDERR_CANTDUPLICATE";
95 case DDERR_NOTLOCKED: return "DDERR_NOTLOCKED";
96 case DDERR_CANTCREATEDC: return "DDERR_CANTCREATEDC";
97 case DDERR_NODC: return "DDERR_NODC";
98 case DDERR_WRONGMODE: return "DDERR_WRONGMODE";
99 case DDERR_IMPLICITLYCREATED: return "DDERR_IMPLICITLYCREATED";
100 case DDERR_NOTPALETTIZED: return "DDERR_NOTPALETTIZED";
101 case DDERR_UNSUPPORTEDMODE: return "DDERR_UNSUPPORTEDMODE";
102 case DDERR_NOMIPMAPHW: return "DDERR_NOMIPMAPHW";
103 case DDERR_INVALIDSURFACETYPE: return "DDERR_INVALIDSURFACETYPE";
104 case DDERR_DCALREADYCREATED: return "DDERR_DCALREADYCREATED";
105 case DDERR_CANTPAGELOCK: return "DDERR_CANTPAGELOCK";
106 case DDERR_CANTPAGEUNLOCK: return "DDERR_CANTPAGEUNLOCK";
107 case DDERR_NOTPAGELOCKED: return "DDERR_NOTPAGELOCKED";
108 case DDERR_NOTINITIALIZED: return "DDERR_NOTINITIALIZED";
109 }
110 return "Unknown Error";
111}
const CHAR * DDErrorString(HRESULT hResult)
Definition: debug.cpp:4
#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE
Definition: ddraw.h:114
#define DDERR_NOT8BITCOLOR
Definition: ddraw.h:105
#define DDERR_NOSTRETCHHW
Definition: ddraw.h:102
#define DDERR_NOTAOVERLAYSURFACE
Definition: ddraw.h:154
#define DDERR_CANTPAGEUNLOCK
Definition: ddraw.h:174
#define DDERR_INVALIDRECT
Definition: ddraw.h:81
#define DDERR_NOT4BITCOLORINDEX
Definition: ddraw.h:104
#define DDERR_HEIGHTALIGN
Definition: ddraw.h:73
#define DDERR_UNSUPPORTEDMODE
Definition: ddraw.h:164
#define DDERR_NOOVERLAYDEST
Definition: ddraw.h:152
#define DDERR_INVALIDPIXELFORMAT
Definition: ddraw.h:80
#define DDERR_VERTICALBLANKINPROGRESS
Definition: ddraw.h:131
#define DDERR_NOTFLIPPABLE
Definition: ddraw.h:156
#define DDERR_NOVSYNCHW
Definition: ddraw.h:107
#define DDERR_NODC
Definition: ddraw.h:160
#define DDERR_OVERLAYCANTCLIP
Definition: ddraw.h:113
#define DDERR_WRONGMODE
Definition: ddraw.h:161
#define DDERR_OUTOFCAPS
Definition: ddraw.h:110
#define DDERR_NOFLIPHW
Definition: ddraw.h:94
#define DDERR_UNSUPPORTEDMASK
Definition: ddraw.h:129
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
#define DDERR_INVALIDMODE
Definition: ddraw.h:77
#define DDERR_CANNOTATTACHSURFACE
Definition: ddraw.h:68
#define DDERR_UNSUPPORTEDFORMAT
Definition: ddraw.h:128
#define DDERR_NOZOVERLAYHW
Definition: ddraw.h:109
#define DDERR_NOTFOUND
Definition: ddraw.h:97
#define DDERR_NOTPAGELOCKED
Definition: ddraw.h:175
#define DDERR_SURFACELOST
Definition: ddraw.h:122
#define DDERR_NOOVERLAYHW
Definition: ddraw.h:98
#define DDERR_NOT4BITCOLOR
Definition: ddraw.h:103
#define DDERR_SURFACEALREADYDEPENDENT
Definition: ddraw.h:118
#define DDERR_SURFACEISOBSCURED
Definition: ddraw.h:121
#define DDERR_NOHWND
Definition: ddraw.h:143
#define DDERR_NODIRECTDRAWSUPPORT
Definition: ddraw.h:92
#define DDERR_INCOMPATIBLEPRIMARY
Definition: ddraw.h:74
#define DDERR_EXCEPTION
Definition: ddraw.h:71
#define DDERR_EXCLUSIVEMODEALREADYSET
Definition: ddraw.h:155
#define DDERR_NOCLIPLIST
Definition: ddraw.h:87
#define DDERR_PALETTEBUSY
Definition: ddraw.h:115
#define DDERR_NOCOLORCONVHW
Definition: ddraw.h:88
#define DDERR_WASSTILLDRAWING
Definition: ddraw.h:132
#define DDERR_HWNDSUBCLASSED
Definition: ddraw.h:144
#define DDERR_NOEXCLUSIVEMODE
Definition: ddraw.h:93
#define DDERR_OVERLAYNOTVISIBLE
Definition: ddraw.h:151
#define DDERR_NODDROPSHW
Definition: ddraw.h:150
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define DDERR_TOOBIGSIZE
Definition: ddraw.h:125
#define DDERR_NOZBUFFERHW
Definition: ddraw.h:108
#define DDERR_CANTCREATEDC
Definition: ddraw.h:159
#define DDERR_HWNDALREADYSET
Definition: ddraw.h:145
#define DDERR_NOPALETTEATTACHED
Definition: ddraw.h:146
#define DDERR_NO3D
Definition: ddraw.h:83
#define DDERR_NOTINITIALIZED
Definition: ddraw.h:185
#define DDERR_XALIGN
Definition: ddraw.h:134
#define DDERR_NOCOLORKEY
Definition: ddraw.h:90
#define DDERR_CURRENTLYNOTAVAIL
Definition: ddraw.h:70
#define DDERR_OUTOFVIDEOMEMORY
Definition: ddraw.h:112
#define DDERR_NOCOOPERATIVELEVELSET
Definition: ddraw.h:89
#define DD_OK
Definition: ddraw.h:186
#define DDERR_SURFACENOTATTACHED
Definition: ddraw.h:123
#define DDERR_DIRECTDRAWALREADYCREATED
Definition: ddraw.h:136
#define DDERR_NOCOLORKEYHW
Definition: ddraw.h:91
#define DDERR_COLORKEYNOTSET
Definition: ddraw.h:116
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
#define DDERR_REGIONTOOSMALL
Definition: ddraw.h:140
#define DDERR_NOMIPMAPHW
Definition: ddraw.h:165
#define DDERR_TOOBIGWIDTH
Definition: ddraw.h:126
#define DDERR_NOGDI
Definition: ddraw.h:95
#define DDERR_NOPALETTEHW
Definition: ddraw.h:147
#define DDERR_INVALIDDIRECTDRAWGUID
Definition: ddraw.h:135
#define DDERR_CANTDUPLICATE
Definition: ddraw.h:157
#define DDERR_GENERIC
Definition: ddraw.h:72
#define DDERR_INVALIDCLIPLIST
Definition: ddraw.h:76
#define DDERR_NOCLIPPERATTACHED
Definition: ddraw.h:142
#define DDERR_IMPLICITLYCREATED
Definition: ddraw.h:162
#define DDERR_NOTPALETTIZED
Definition: ddraw.h:163
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDERR_CANTLOCKSURFACE
Definition: ddraw.h:120
#define DDERR_DCALREADYCREATED
Definition: ddraw.h:171
#define DDERR_NOALPHAHW
Definition: ddraw.h:84
#define DDERR_CANTPAGELOCK
Definition: ddraw.h:173
#define DDERR_CLIPPERISUSINGHWND
Definition: ddraw.h:141
#define DDERR_NOROTATIONHW
Definition: ddraw.h:101
#define DDERR_NORASTEROPHW
Definition: ddraw.h:100
#define DDERR_LOCKEDSURFACES
Definition: ddraw.h:82
#define DDERR_SURFACEALREADYATTACHED
Definition: ddraw.h:117
#define DDERR_NOEMULATION
Definition: ddraw.h:139
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67
#define DDERR_NOTLOCKED
Definition: ddraw.h:158
#define DDERR_NOTEXTUREHW
Definition: ddraw.h:106
#define DDERR_CANNOTDETACHSURFACE
Definition: ddraw.h:69
#define DDERR_SURFACEBUSY
Definition: ddraw.h:119
#define DDERR_NOBLTHW
Definition: ddraw.h:149
#define DDERR_NODIRECTDRAWHW
Definition: ddraw.h:137
#define DDERR_INVALIDPOSITION
Definition: ddraw.h:153
#define DDERR_TOOBIGHEIGHT
Definition: ddraw.h:124
#define DDERR_PRIMARYSURFACEALREADYEXISTS
Definition: ddraw.h:138
#define DDERR_INVALIDSURFACETYPE
Definition: ddraw.h:166
#define DDERR_BLTFASTCANTCLIP
Definition: ddraw.h:148
#define DDERR_NOMIRRORHW
Definition: ddraw.h:96
char CHAR
Definition: xmlstorage.h:175