98{
104 PBITMAPV5HEADER pbV5Header;
106 DWORD ajBits[100] = {0xff, 0x00, 0xcc, 0xf0, 0x0f};
109
110 bisize =
sizeof(BITMAPV5HEADER) + 256 *
sizeof(
DWORD);
114
116 ok(hdcScreen != 0,
"GetDC failed, skipping tests\n");
117 if (hdcScreen ==
NULL)
return;
118
120 ok(
hbmp !=
NULL,
"CreateCompatibleBitmap failed\n");
121
122
126
130
134
138
139
140
141
147
148
154
155
161
162
163
164
165
166
167
173 ok(
pbi->bmiHeader.biWidth == 0,
"\n");
174 ok(
pbi->bmiHeader.biHeight == 0,
"\n");
175 ok(
pbi->bmiHeader.biBitCount == 0,
"\n");
176 ok(
pbi->bmiHeader.biSizeImage == 0,
"\n");
177
178
185 ok(
pbi->bmiHeader.biWidth == 16,
"\n");
186 ok(
pbi->bmiHeader.biHeight == 16,
"\n");
187 ok(
pbi->bmiHeader.biBitCount == ScreenBpp,
"\n");
188 ok(
pbi->bmiHeader.biSizeImage == (16 * 16) * (ScreenBpp / 8),
"\n");
189
190
198
199
200
204
208
212
216
218 pbi->bmiHeader.biSize =
sizeof(BITMAPV5HEADER);
220
222 pbi->bmiHeader.biSize =
sizeof(BITMAPV5HEADER) + 4;
224 ok_int(pbV5Header->bV5RedMask, 0);
225 ok_int(pbV5Header->bV5GreenMask, 0);
226 ok_int(pbV5Header->bV5BlueMask, 0);
227 ok_int(pbV5Header->bV5AlphaMask, 0);
228 ok_int(pbV5Header->bV5CSType, 0);
229
230 ok_int(pbV5Header->bV5GammaRed, 0);
231 ok_int(pbV5Header->bV5GammaGreen, 0);
232 ok_int(pbV5Header->bV5GammaBlue, 0);
233 ok_int(pbV5Header->bV5Intent, 0);
234 ok_int(pbV5Header->bV5ProfileData, 0);
235 ok_int(pbV5Header->bV5ProfileSize, 0);
236 ok_int(pbV5Header->bV5Reserved, 0);
237
241
243
244
246 ok(
hbmp != 0,
"failed to create bitmap\n");
254
255
256 pbi->bmiHeader.biSizeImage = 0;
259
260
261 pbi->bmiHeader.biWidth = 17;
262 pbi->bmiHeader.biHeight = 3;
263 pbi->bmiHeader.biSizeImage = 0;
268
269
270 pbi->bmiHeader.biBitCount = 4;
271 pbi->bmiHeader.biSizeImage = 1;
275
276
277 pbi->bmiHeader.biBitCount = 8;
278 pbi->bmiHeader.biSizeImage = 1000;
282
283
284 pbi->bmiHeader.biBitCount = 123;
285 pbi->bmiHeader.biSizeImage = -12;
289
290
295 ok_int(
pbi->bmiHeader.biXPelsPerMeter, 0);
296 ok_int(
pbi->bmiHeader.biYPelsPerMeter, 0);
297
298
301 pbi->bmiHeader.biWidth = 12;
305
308 pbi->bmiHeader.biSizeImage = 123;
310
315
316
319 pbi->bmiHeader.biBitCount = 5;
321 pbi->bmiHeader.biBitCount = 1;
323 pbi->bmiHeader.biBitCount = 8;
325 pbi->bmiHeader.biBitCount = 32;
333
334
336 pbi->bmiHeader.biWidth = 4;
337 pbi->bmiHeader.biHeight = 4;
338 pbi->bmiHeader.biPlanes = 3;
339 pbi->bmiHeader.biBitCount = 32;
344 pbi->bmiHeader.biWidth = 0;
346 pbi->bmiHeader.biWidth = 2;
349 pbi->bmiHeader.biWidth = -3;
351 pbi->bmiHeader.biWidth = 4;
352 pbi->bmiHeader.biHeight = 0;
354 pbi->bmiHeader.biHeight = -4;
356 pbi->bmiHeader.biBitCount = 31;
358 pbi->bmiHeader.biBitCount = 16;
359 pbi->bmiHeader.biPlanes = 23;
374
379
380
382 pbi->bmiHeader.biWidth = 4;
383 pbi->bmiHeader.biHeight = 4;
384 pbi->bmiHeader.biPlanes = 1;
385 pbi->bmiHeader.biBitCount = 32;
387 pbi->bmiHeader.biSizeImage = 0;
388 pbi->bmiHeader.biXPelsPerMeter = 0;
389 pbi->bmiHeader.biYPelsPerMeter = 0;
390 pbi->bmiHeader.biClrUsed = 0;
391 pbi->bmiHeader.biClrImportant = 0;
392 cjSizeImage = ((
pbi->bmiHeader.biWidth *
pbi->bmiHeader.biBitCount + 31) / 32) * 4 *
pbi->bmiHeader.biHeight;
402 ok_int(
pbi->bmiHeader.biXPelsPerMeter, 0);
403 ok_int(
pbi->bmiHeader.biYPelsPerMeter, 0);
405 ok_int(
pbi->bmiHeader.biClrImportant, 0);
406
407
408 pbi->bmiHeader.biBitCount = 0;
413
414
415 pbi->bmiHeader.biBitCount = 24;
416 pbi->bmiHeader.biWidth = 3;
418
419
420 pbi->bmiHeader.biBitCount = 24;
421 pbi->bmiHeader.biWidth = 3;
423
424
425 pbi->bmiHeader.biBitCount = 17;
427
428
431 pbi->bmiHeader.biBitCount = 5;
433
436
437
439 ok(
hbmp != 0,
"failed to create bitmap\n");
447
448
449 pbi->bmiHeader.biSizeImage = 0;
451
452
453 cjSizeImage = ((
pbi->bmiHeader.biWidth *
pbi->bmiHeader.biBitCount + 31) / 32) * 4 *
pbi->bmiHeader.biHeight;
456
457
459 ok(
hdcMem != 0,
"CreateCompatibleDC failed, skipping tests\n");
463
467}
#define ok_int(expression, result)
#define UlongToHandle(ul)
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
_Inout_ PERBANDINFO * pbi
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
struct tagBITMAPCOREHEADER BITMAPCOREHEADER
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI SetBitmapDimensionEx(_In_ HBITMAP, _In_ int, _In_ int, _Out_opt_ LPSIZE)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)