-
Notifications
You must be signed in to change notification settings - Fork 3
/
D2Derr.h
206 lines (161 loc) · 5.22 KB
/
D2Derr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/*=========================================================================*\
Copyright (c) Microsoft Corporation. All rights reserved.
\*=========================================================================*/
#pragma once
/*=========================================================================*\
D2D Status Codes
\*=========================================================================*/
#define FACILITY_D2D 0x899
#define MAKE_D2DHR( sev, code )\
MAKE_HRESULT( sev, FACILITY_D2D, (code) )
#define MAKE_D2DHR_ERR( code )\
MAKE_D2DHR( 1, code )
//+----------------------------------------------------------------------------
//
// D2D error codes
//
//------------------------------------------------------------------------------
//
// Error codes shared with WINCODECS
//
//
// The pixel format is not supported.
//
#define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT
//
// Error codes that were already returned in prior versions and were part of the
// MIL facility.
//
// Error codes mapped from WIN32 where there isn't already another HRESULT based
// define
//
//
// The supplied buffer was too small to accomodate the data.
//
#define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
//
// D2D specific codes
//
//
// The object was not in the correct state to process the method.
//
#define D2DERR_WRONG_STATE MAKE_D2DHR_ERR(0x001)
//
// The object has not yet been initialized.
//
#define D2DERR_NOT_INITIALIZED MAKE_D2DHR_ERR(0x002)
//
// The requested opertion is not supported.
//
#define D2DERR_UNSUPPORTED_OPERATION MAKE_D2DHR_ERR(0x003)
//
// The geomery scanner failed to process the data.
//
#define D2DERR_SCANNER_FAILED MAKE_D2DHR_ERR(0x004)
//
// D2D could not access the screen.
//
#define D2DERR_SCREEN_ACCESS_DENIED MAKE_D2DHR_ERR(0x005)
//
// A valid display state could not be determined.
//
#define D2DERR_DISPLAY_STATE_INVALID MAKE_D2DHR_ERR(0x006)
//
// The supplied vector is vero.
//
#define D2DERR_ZERO_VECTOR MAKE_D2DHR_ERR(0x007)
//
// An internal error (D2D bug) occurred. On checked builds, we would assert.
//
// The application should close this instance of D2D and should consider
// restarting its process.
//
#define D2DERR_INTERNAL_ERROR MAKE_D2DHR_ERR(0x008)
//
// The display format we need to render is not supported by the
// hardware device.
//
#define D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED MAKE_D2DHR_ERR(0x009)
//
// A call to this method is invalid.
//
#define D2DERR_INVALID_CALL MAKE_D2DHR_ERR(0x00A)
//
// No HW rendering device is available for this operation.
//
#define D2DERR_NO_HARDWARE_DEVICE MAKE_D2DHR_ERR(0x00B)
//
// There has been a presentation error that may be recoverable. The caller
// needs to recreate, rerender the entire frame, and reattempt present.
//
#define D2DERR_RECREATE_TARGET MAKE_D2DHR_ERR(0x00C)
//
// Shader construction failed because it was too complex.
//
#define D2DERR_TOO_MANY_SHADER_ELEMENTS MAKE_D2DHR_ERR(0x00D)
//
// Shader compilation failed.
//
#define D2DERR_SHADER_COMPILE_FAILED MAKE_D2DHR_ERR(0x00E)
//
// Requested DX surface size exceeded maximum texture size.
//
#define D2DERR_MAX_TEXTURE_SIZE_EXCEEDED MAKE_D2DHR_ERR(0x00F)
//
// The requested D2D version is not supported.
//
#define D2DERR_UNSUPPORTED_VERSION MAKE_D2DHR_ERR(0x010)
//
// Invalid number.
//
#define D2DERR_BAD_NUMBER MAKE_D2DHR_ERR(0x0011)
//
// Objects used together must be created from the same factory instance.
//
#define D2DERR_WRONG_FACTORY MAKE_D2DHR_ERR(0x012)
//
// A layer resource can only be in use once at any point in time.
//
#define D2DERR_LAYER_ALREADY_IN_USE MAKE_D2DHR_ERR(0x013)
//
// The pop call did not match the corresponding push call
//
#define D2DERR_POP_CALL_DID_NOT_MATCH_PUSH MAKE_D2DHR_ERR(0x014)
//
// The resource was realized on the wrong render target
//
#define D2DERR_WRONG_RESOURCE_DOMAIN MAKE_D2DHR_ERR(0x015)
//
// The push and pop calls were unbalanced
//
#define D2DERR_PUSH_POP_UNBALANCED MAKE_D2DHR_ERR(0x016)
//
// Attempt to copy from a render target while a layer or clip rect is applied
//
#define D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT MAKE_D2DHR_ERR(0x017)
//
// The brush types are incompatible for the call.
//
#define D2DERR_INCOMPATIBLE_BRUSH_TYPES MAKE_D2DHR_ERR(0x018)
//
// An unknown win32 failure occurred.
//
#define D2DERR_WIN32_ERROR MAKE_D2DHR_ERR(0x019)
//
// The render target is not compatible with GDI
//
#define D2DERR_TARGET_NOT_GDI_COMPATIBLE MAKE_D2DHR_ERR(0x01A)
//
// A text client drawing effect object is of the wrong type
//
#define D2DERR_TEXT_EFFECT_IS_WRONG_TYPE MAKE_D2DHR_ERR(0x01B)
//
// The application is holding a reference to the IDWriteTextRenderer interface
// after the corresponding DrawText or DrawTextLayout call has returned. The
// IDWriteTextRenderer instance will be zombied.
//
#define D2DERR_TEXT_RENDERER_NOT_RELEASED MAKE_D2DHR_ERR(0x01C)
//
// The requested size is larger than the guaranteed supported texture size.
//
#define D2DERR_EXCEEDS_MAX_BITMAP_SIZE MAKE_D2DHR_ERR(0x01D)