Subversion Repositories Games.Chess Giants

Rev

Details | Last modification | View Log | RSS feed

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