44#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); }
46#define ole_expect(expr, expect) { \
48 ok(r == (expect), #expr " returned %lx, expected %s (%lx)\n", r, #expect, expect); \
51#define ole_check(expr) ole_expect(expr, S_OK);
58#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
620x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff,
630xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
690xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c,
700x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05,
710x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b,
720x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13,
730x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17,
740x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05,
750x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e,
760x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
770x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
780x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0,
790x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,
800x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
810x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00,
820x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4,
830x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
840x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
850x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01,
860x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9
910x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
920x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,
930xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,
940x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5,
950x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41,
960x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,
970xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
1020x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
1030x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
1040x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
1050x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00,
1110x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,
1120x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00,
1130x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b
1190xd7,0xcd,0xc6,0x9a, 0x00,0x00,0x00,0x00, 0x00,0x00,0xee,0x02, 0xb1,0x03,0xa0,0x05,
1200x00,0x00,0x00,0x00, 0xee,0x53,0x01,0x00, 0x09,0x00,0x00,0x03, 0x13,0x00,0x00,0x00,
1210x01,0x00,0x05,0x00, 0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
1220x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00
127 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x19, 0x00,
128 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
129 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x0a,
130 0x16, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x00,
131 0x54, 0x65, 0x73, 0x74, 0x03, 0x00, 0x05, 0x00,
132 0x08, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00,
138 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
140 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
142 0xe7, 0xff, 0xff, 0xff, 0xe9, 0xff, 0xff, 0xff,
143 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
144 0xf4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
145 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
147 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
148 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
150 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
151 0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
152 0x08, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
153 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
154 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
155 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
156 0x00, 0x00, 0xc8, 0x41, 0x00, 0x80, 0xbb, 0x41,
157 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
158 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
160 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
161 0xff, 0xff, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00,
162 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
163 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
164 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
165 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
166 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
167 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
168 0x14, 0x00, 0x00, 0x00
210 OLE_XSIZE_HIMETRIC
width;
211 OLE_YSIZE_HIMETRIC
height;
220 ok(
hres ==
S_OK,
"OLP (NULL,..) does not return 0, but 0x%08lx\n",
hres);
221 ok(pic !=
NULL,
"OLP (NULL,..) returns NULL, instead of !NULL\n");
228 ok(
hres ==
S_OK,
"IPicture_QI does not return S_OK, but 0x%08lx\n",
hres);
229 ok(pvObj !=
NULL,
"IPicture_QI does return NULL, instead of a ptr\n");
231 IPicture_Release ((
IPicture*)pvObj);
235 ok(
hres ==
S_OK,
"IPicture_get_Handle does not return S_OK, but 0x%08lx\n",
hres);
236 ok(
handle != 0,
"IPicture_get_Handle returns a NULL handle, but it should be non NULL\n");
247 ok(
hres ==
S_OK,
"IPicture_get_Width does not return S_OK, but 0x%08lx\n",
hres);
248 ok(
width != 0,
"IPicture_get_Width returns 0, but it should not be 0.\n");
252 ok(
hres ==
S_OK,
"IPicture_get_Height does not return S_OK, but 0x%08lx\n",
hres);
253 ok(
height != 0,
"IPicture_get_Height returns 0, but it should not be 0.\n");
256 hres = IPicture_get_Type (pic, &
type);
257 ok(
hres ==
S_OK,
"IPicture_get_Type does not return S_OK, but 0x%08lx\n",
hres);
261 hres = IPicture_get_Attributes (pic, &
attr);
262 ok(
hres ==
S_OK,
"IPicture_get_Attributes does not return S_OK, but 0x%08lx\n",
hres);
263 ok(
attr == 0,
"IPicture_get_Attributes returns %ld, but it should be 0.\n",
attr);
266 hres = IPicture_get_hPal (pic, &hPal);
267 ok(
hres ==
S_OK,
"IPicture_get_hPal does not return S_OK, but 0x%08lx\n",
hres);
269 ok(hPal == 0,
"IPicture_get_hPal returns %d, but it should be 0.\n", hPal);
271 res = IPicture_Release (pic);
272 ok (
res == 0,
"refcount after release is %ld, but should be 0?\n",
res);
276test_pic(
const unsigned char *imgdata,
unsigned int imgsize)
294 ok (
hres ==
S_OK,
"createstreamonhglobal failed? doubt it... hres 0x%08lx\n",
hres);
298 ok (
hres ==
S_OK,
"istream seek failed? doubt it... hres 0x%08lx\n",
hres);
309 for (
i = 1;
i <= 8;
i++) {
318 for (
j = 2;
j <=
i;
j++) {
325 ok (
hres ==
S_OK,
"createstreamonhglobal failed? doubt it... hres 0x%08lx\n",
hres);
329 ok (
hres ==
S_OK,
"istream seek failed? doubt it... hres 0x%08lx\n",
hres);
362 ok (
hres ==
S_OK,
"CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n",
hres);
366 ok (
hres ==
S_OK,
"istream seek failed? doubt it... hres 0x%08lx\n",
hres);
371 ok(
hres ==
S_OK,
"empty picture not loaded, hres 0x%08lx\n",
hres);
372 ok(pic !=
NULL,
"empty picture not loaded, pic is NULL\n");
374 hres = IPicture_get_Type (pic, &
type);
375 ok (
hres ==
S_OK,
"empty picture get type failed with hres 0x%08lx\n",
hres);
379 hres = IPicture_get_Attributes (pic, &
attr);
380 ok (
hres ==
S_OK,
"empty picture get attributes failed with hres 0x%08lx\n",
hres);
381 ok (
attr == 0,
"attr is %ld, but should be 0\n",
attr);
384 ok (
hres ==
S_OK,
"empty picture get handle failed with hres 0x%08lx\n",
hres);
385 ok (
handle == 0,
"empty picture get handle did not return 0, but 0x%08x\n",
handle);
386 IPicture_Release (pic);
408 ok (
hres ==
S_OK,
"CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n",
hres);
413 ok (
hres ==
S_OK,
"istream seek failed? doubt it... hres 0x%08lx\n",
hres);
418 ok(
hres ==
S_OK,
"empty picture not loaded, hres 0x%08lx\n",
hres);
419 ok(pic !=
NULL,
"empty picture not loaded, pic is NULL\n");
421 hres = IPicture_get_Type (pic, &
type);
422 ok (
hres ==
S_OK,
"empty picture get type failed with hres 0x%08lx\n",
hres);
425 IPicture_Release (pic);
434 DISPPARAMS dispparams;
456 V_BOOL(&vararg) = VARIANT_FALSE;
457 dispparams.cNamedArgs = 0;
458 dispparams.rgdispidNamedArgs =
NULL;
459 dispparams.cArgs = 1;
460 dispparams.rgvarg = &vararg;
462 ok(
hr ==
DISP_E_UNKNOWNNAME,
"IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n",
hr);
464 ok(
hr ==
DISP_E_UNKNOWNNAME,
"IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n",
hr);
466 dispparams.cArgs = 0;
467 dispparams.rgvarg =
NULL;
482 ok(
V_VT(&varresult) ==
VT_I4,
"V_VT(&varresult) should have been VT_UINT instead of %d\n",
V_VT(&varresult));
490 dispparams.cArgs = 1;
491 dispparams.rgvarg = &vararg;
495 dispparams.cArgs = 1;
496 dispparams.rgvarg = &vararg;
517 dispparams.rgvarg =
args;
518 dispparams.rgdispidNamedArgs =
NULL;
519 dispparams.cArgs = 10;
520 dispparams.cNamedArgs = 0;
533 dispparams.cArgs = 9;
538 IPictureDisp_Release(picdisp);
558 desc.bmp.hpal = (HPALETTE)0xbeefdead;
582 ok(0,
"picture type %d is not supported\n",
type);
605 pict = (
void *)0xdeadbeef;
608 ok(pict ==
NULL,
"got %p\n", pict);
616 hr = IPicture_get_Type(pict, &
type);
621 hr = IPicture_get_Handle(pict, &
handle);
629 hr = IPicture_get_hPal(pict, &
handle);
647 IPicture_Release(pict);
670 ok(
handle != 0,
"handle is null\n");
675 ole_check(IPicture_get_Height(pict, &cxy));
678 ole_check(IPicture_get_Width(pict, &cxy));
681 ole_check(IPicture_get_KeepOriginalFormat(pict, &keep));
685 IPicture_Release(pict);
726 ok(
handle != 0,
"handle is null\n");
731 ole_check(IPicture_get_Height(pict, &cxy));
734 ole_check(IPicture_get_Width(pict, &cxy));
737 ole_check(IPicture_get_KeepOriginalFormat(pict, &keep));
740 IPicture_Release(pict);
745 OLE_XPOS_HIMETRIC xSrc,
746 OLE_YPOS_HIMETRIC ySrc,
747 OLE_XSIZE_HIMETRIC cxSrc,
748 OLE_YSIZE_HIMETRIC cySrc,
757 hr = IPicture_Render(iface,
hdc,
x,
y,
cx,
cy, xSrc, ySrc, cxSrc, cySrc, bounds);
759 IPicture_QueryInterface(iface, &
IID_IDispatch, (
void**)&disp);
785 ok(
hr == hr_disp,
"DISPID_PICT_RENDER returned wrong code, 0x%08lx, expected 0x%08lx\n",
788 IDispatch_Release(disp);
799 OLE_XSIZE_HIMETRIC pWidth;
800 OLE_YSIZE_HIMETRIC pHeight;
807 hres = IPicture_get_Type(pic, &
type);
808 ok(
hres ==
S_OK,
"IPicture_get_Type does not return S_OK, but 0x%08lx\n",
hres);
811 hres =
picture_render(pic,
hdc, 0, 0, 0, 0, 0, 0, 0, 0,
NULL);
813 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 10, 0,
NULL);
815 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 0, 10,
NULL);
817 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 0, 0,
NULL);
819 hres =
picture_render(pic,
hdc, 0, 0, 0, 10, 0, 0, 10, 10,
NULL);
821 hres =
picture_render(pic,
hdc, 0, 0, 10, 0, 0, 0, 10, 10,
NULL);
823 hres =
picture_render(pic,
hdc, 0, 0, 0, 0, 0, 0, 10, 10,
NULL);
826 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 10, 10,
NULL);
828 IPicture_Release(pic);
833 if(!
desc.icon.hicon){
834 win_skip(
"LoadIcon failed. Skipping...\n");
842 hres =
picture_render(pic,
hdc, 0, 0, 0, 0, 0, 0, 0, 0,
NULL);
844 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 10, 0,
NULL);
846 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 0, 10,
NULL);
848 hres =
picture_render(pic,
hdc, 0, 0, 10, 10, 0, 0, 0, 0,
NULL);
850 hres =
picture_render(pic,
hdc, 0, 0, 0, 10, 0, 0, 10, 10,
NULL);
852 hres =
picture_render(pic,
hdc, 0, 0, 10, 0, 0, 0, 10, 10,
NULL);
854 hres =
picture_render(pic,
hdc, 0, 0, 0, 0, 0, 0, 10, 10,
NULL);
858 IPicture_get_Width(pic, &pWidth);
859 IPicture_get_Height(pic, &pHeight);
866 hres =
picture_render(pic,
hdc, 1, 1, 9, 9, 0, pHeight, pWidth, -pHeight,
NULL);
874 "Color at 0,0 should be unchanged 0x%06lX, but was 0x%06lX\n",
expected,
result);
877 "Color at 5,5 should have changed, but still was 0x%06lX\n",
expected);
880 "Color at 10,10 should be unchanged 0x%06lX, but was 0x%06lX\n",
expected,
result);
883 IPicture_Release(pic);
896 hres = IPicture_get_Type(pic, &
type);
897 ok(
hres ==
S_OK,
"IPicture_get_Type does not return S_OK, but 0x%08lx\n",
hres);
900 hres = IPicture_get_Attributes(pic,
NULL);
904 hres = IPicture_get_Attributes(pic, &
attr);
906 ok(
attr == 0,
"IPicture_get_Attributes does not reset attr to zero, got %ld\n",
attr);
908 IPicture_Release(pic);
918 hres = IPicture_get_Handle(pic,
NULL);
921 IPicture_Release(pic);
932 hres = IPicture_get_Type(pic,
NULL);
935 IPicture_Release(pic);
947 WCHAR temp_fileW[
MAX_PATH + 5] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/'};
955 LPOLESTR szURLorPath;
958 } invalid_parameters[] =
972 invalid_parameters[
i].
riid,
973 (
void **)invalid_parameters[
i].pic);
975 "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08lx\n",
i,
hres);
977 "[%d] Expected output pointer to be 0xdeadbeef, got %p\n",
i, pic);
986 "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n",
hres);
988 "Expected the output interface pointer to be NULL, got %p\n", pic);
996 "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n",
hres);
998 "Expected the output interface pointer to be NULL, got %p\n", pic);
1014 "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n",
hres);
1016 IPicture_Release(pic);
1023 IPicture_Release(pic);
1030 "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n",
hres);
1032 IPicture_Release(pic);
1048 "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n",
hres);
1061 "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n",
hres);
1076 ptr = temp_fileW + 8;
1087 "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n",
hres);
1089 IPicture_Release(pic);
1105 "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n",
hres);
1126 static const BYTE bmp_bits[1024];
1127 OLE_XSIZE_HIMETRIC
cx;
1128 OLE_YSIZE_HIMETRIC
cy;
1137 desc.cbSizeofstruct =
sizeof(
desc);
1154 hr = IPicture_get_Width(pic, &
cx);
1156 ok(
cx ==
d,
"got %ld, expected %d\n",
cx,
d);
1160 hr = IPicture_get_Height(pic, &
cy);
1162 ok(
cy ==
d,
"got %ld, expected %d\n",
cy,
d);
1165 IPicture_Release(pic);
1169 1, 1, bmp_bits, bmp_bits);
1170 ok(icon !=
NULL,
"failed to create icon\n");
1173 desc.icon.hicon = icon;
1180 hr = IPicture_get_Width(pic, &
cx);
1182 ok(
cx ==
d,
"got %ld, expected %d\n",
cx,
d);
1186 hr = IPicture_get_Height(pic, &
cy);
1188 ok(
cy ==
d,
"got %ld, expected %d\n",
cy,
d);
1190 IPicture_Release(pic);
1211 desc.cbSizeofstruct =
sizeof(
desc);
1216 ok(
hr ==
S_OK,
"OleCreatePictureIndirect error %#lx\n",
hr);
1219 hr = IPicture_get_Type(pic, &
type);
1223 hr = IPicture_get_Handle(pic, &
handle);
1224 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1229 ok(
hr ==
S_OK,
"createstreamonhglobal error %#lx\n",
hr);
1232 hr = IPicture_SaveAsFile(pic, dst_stream,
TRUE, &
size);
1233 ok(
hr ==
S_OK,
"IPicture_SaveasFile error %#lx\n",
hr);
1235 ok(
size == 66,
"expected 66, got %ld\n",
size);
1238 ok(!
memcmp(&
mem[0],
"BM", 2),
"got wrong bmp header %04lx\n",
mem[0]);
1242 hr = IPicture_SaveAsFile(pic, dst_stream,
FALSE, &
size);
1246 ok(
size == -1,
"expected -1, got %ld\n",
size);
1253 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
1256 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1257 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1260 hr = IPersistStream_Save(src_stream, dst_stream,
TRUE);
1264 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1265 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1268 IPersistStream_Release(src_stream);
1269 IStream_Release(dst_stream);
1272 ok(!
memcmp(
mem,
"lt\0\0", 4),
"got wrong stream header %04lx\n",
mem[0]);
1273 ok(
mem[1] == 66,
"expected stream size 66, got %lu\n",
mem[1]);
1274 ok(!
memcmp(&
mem[2],
"BM", 2),
"got wrong bmp header %04lx\n",
mem[2]);
1280 IPicture_Release(pic);
1298 desc.cbSizeofstruct =
sizeof(
desc);
1302 ok(
hr ==
S_OK,
"OleCreatePictureIndirect error %#lx\n",
hr);
1305 hr = IPicture_get_Type(pic, &
type);
1309 hr = IPicture_get_Handle(pic, &
handle);
1310 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1315 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#lx\n",
hr);
1318 hr = IPicture_SaveAsFile(pic, dst_stream,
TRUE, &
size);
1319 ok(
hr ==
S_OK,
"IPicture_SaveasFile error %#lx\n",
hr);
1321 ok(
size == 766,
"expected 766, got %ld\n",
size);
1324 ok(
mem[0] == 0x00010000,
"got wrong icon header %04lx\n",
mem[0]);
1328 hr = IPicture_SaveAsFile(pic, dst_stream,
FALSE, &
size);
1332 ok(
size == -1,
"expected -1, got %ld\n",
size);
1339 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
1342 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1344 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1348 hr = IPersistStream_Save(src_stream, dst_stream,
TRUE);
1352 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1354 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1358 IPersistStream_Release(src_stream);
1359 IStream_Release(dst_stream);
1362 ok(!
memcmp(
mem,
"lt\0\0", 4),
"got wrong stream header %04lx\n",
mem[0]);
1364 ok(
mem[1] == 766,
"expected stream size 766, got %lu\n",
mem[1]);
1365 ok(
mem[2] == 0x00010000,
"got wrong icon header %04lx\n",
mem[2]);
1371 IPicture_Release(pic);
1389 memset(&pic, 0,
sizeof(pic));
1390 desc.cbSizeofstruct =
sizeof(
desc);
1393 ok(
hr ==
S_OK,
"OleCreatePictureIndirect error %#lx\n",
hr);
1396 hr = IPicture_get_Type(pic, &
type);
1400 handle = (OLE_HANDLE)0xdeadbeef;
1401 hr = IPicture_get_Handle(pic, &
handle);
1402 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1407 ok(
hr ==
S_OK,
"createstreamonhglobal error %#lx\n",
hr);
1410 hr = IPicture_SaveAsFile(pic, dst_stream,
TRUE, &
size);
1411 ok(
hr ==
S_OK,
"IPicture_SaveasFile error %#lx\n",
hr);
1413 ok(
size == -1,
"expected -1, got %ld\n",
size);
1416 hr = IPicture_SaveAsFile(pic, dst_stream,
FALSE, &
size);
1417 ok(
hr ==
S_OK,
"IPicture_SaveasFile error %#lx\n",
hr);
1419 ok(
size == -1,
"expected -1, got %ld\n",
size);
1422 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
1425 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1426 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1429 hr = IPersistStream_GetSizeMax(src_stream,
NULL);
1432 hr = IPersistStream_Save(src_stream, dst_stream,
TRUE);
1436 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1437 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1441 ok(!
memcmp(
mem,
"lt\0\0", 4),
"got wrong stream header %04lx\n",
mem[0]);
1442 ok(
mem[1] == 0,
"expected stream size 0, got %lu\n",
mem[1]);
1445 IPersistStream_Release(src_stream);
1446 IPicture_Release(pic);
1455 ok(
hr ==
S_OK,
"OleLoadPicture error %#lx\n",
hr);
1456 ok(pic !=
NULL,
"picture should not be not NULL\n");
1460 hr = IPicture_get_Type(pic, &
type);
1464 handle = (OLE_HANDLE)0xdeadbeef;
1465 hr = IPicture_get_Handle(pic, &
handle);
1466 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1469 IPicture_Release(pic);
1471 IStream_Release(dst_stream);
1475 ok(
stream !=
NULL,
"failed to create empty image stream\n");
1479 ok(
hr ==
S_OK,
"OleLoadPicture error %#lx\n",
hr);
1480 ok(pic !=
NULL,
"picture should not be not NULL\n");
1484 hr = IPicture_get_Type(pic, &
type);
1488 handle = (OLE_HANDLE)0xdeadbeef;
1489 hr = IPicture_get_Handle(pic, &
handle);
1490 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1493 IPicture_Release(pic);
1519 DWORD expected_size, expected_bpp;
1526 expected_bpp =
bpp <= 8 ?
bpp : 24;
1530 info->bmiHeader.biWidth = 1;
1531 info->bmiHeader.biHeight = 1;
1532 info->bmiHeader.biPlanes = 1;
1533 info->bmiHeader.biBitCount =
bpp;
1537 desc.cbSizeofstruct =
sizeof(
desc);
1543 hr = IPicture_get_Type(pic, &
type);
1547 hr = IPicture_get_Handle(pic, &
handle);
1548 ok(
hr ==
S_OK,
"get_Handle error %#8lx\n",
hr);
1553 ok(
hr ==
S_OK,
"createstreamonhglobal error %#lx\n",
hr);
1556 hr = IPicture_SaveAsFile(pic, dst_stream,
TRUE, &
size);
1557 ok(
hr ==
S_OK,
"IPicture_SaveasFile error %#lx\n",
hr);
1559 ok(
size == expected_size,
"expected %ld, got %ld\n", expected_size,
size);
1560 if (
size == expected_size) {
1562 ok(!
memcmp(&
mem[0],
"BM", 2),
"got wrong bmp header %04lx\n",
mem[0]);
1564 ok(
info->bmiHeader.biBitCount == expected_bpp,
"expected bpp %lu, got %hu\n", expected_bpp,
info->bmiHeader.biBitCount);
1565 ok(
info->bmiHeader.biCompression ==
BI_RGB,
"expected BI_RGB, got %lu\n",
info->bmiHeader.biCompression);
1570 hr = IPicture_SaveAsFile(pic, dst_stream,
FALSE, &
size);
1574 ok(
size == -1,
"expected -1, got %ld\n",
size);
1581 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
1584 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1585 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1588 hr = IPersistStream_Save(src_stream, dst_stream,
TRUE);
1592 hr = IPersistStream_GetSizeMax(src_stream, &
maxsize);
1593 ok(
hr ==
S_OK,
"GetSizeMax error %#lx\n",
hr);
1596 IPersistStream_Release(src_stream);
1597 IStream_Release(dst_stream);
1600 ok(!
memcmp(
mem,
"lt\0\0", 4),
"got wrong stream header %04lx\n",
mem[0]);
1601 ok(
mem[1] == expected_size,
"expected stream size %lu, got %lu\n", expected_size,
mem[1]);
1602 ok(!
memcmp(&
mem[2],
"BM", 2),
"got wrong bmp header %04lx\n",
mem[2]);
1604 ok(
info->bmiHeader.biBitCount == expected_bpp,
"expected bpp %lu, got %hu\n", expected_bpp,
info->bmiHeader.biBitCount);
1605 ok(
info->bmiHeader.biCompression ==
BI_RGB,
"expected BI_RGB, got %lu\n",
info->bmiHeader.biCompression);
1611 IPicture_Release(pic);
1621 if (!pOleLoadPicture)
1623 win_skip(
"OleLoadPicture is not available\n");
1636 if (pOleLoadPictureEx)
1643 win_skip(
"OleLoadPictureEx is not available\n");
1670 This->supportHandle=0;
1691 *ppvObject = &
This->IStream_iface;
1693 if ((*ppvObject)==0)
1716 void* supportBuffer;
1717 ULONG bytesReadBuffer;
1718 ULONG bytesToReadFromBuffer;
1721 pcbRead = &bytesReadBuffer;
1722 bytesToReadFromBuffer =
min(
This->streamSize.LowPart -
This->currentPosition.LowPart,
cb);
1724 memcpy(pv, (
char *) supportBuffer+
This->currentPosition.LowPart, bytesToReadFromBuffer);
1725 This->currentPosition.LowPart+=bytesToReadFromBuffer;
1726 *pcbRead = bytesToReadFromBuffer;
1740 void* supportBuffer;
1744 if (pcbWritten == 0)
1751 IStream_SetSize(iface, newSize);
1754 memcpy((
char *) supportBuffer+
This->currentPosition.LowPart, pv,
cb);
1755 This->currentPosition.LowPart+=
cb;
1771 case STREAM_SEEK_SET:
1775 case STREAM_SEEK_CUR:
1776 newPosition =
This->currentPosition;
1778 case STREAM_SEEK_END:
1779 newPosition =
This->streamSize;
1787 if (plibNewPosition) *plibNewPosition = newPosition;
1788 This->currentPosition = newPosition;
1800 if (
This->streamSize.LowPart == libNewSize.
LowPart)
1803 if (supportHandle == 0)
1805 This->supportHandle = supportHandle;
1818 BYTE tmpBuffer[128];
1828 while (
cb.LowPart > 0 )
1830 if (
cb.LowPart >= 128 )
1833 copySize =
cb.LowPart;
1834 IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
1835 totalBytesRead.
LowPart += bytesRead;
1836 IStream_Write(pstm, tmpBuffer, bytesRead, &
bytesWritten);
1843 if (bytesRead!=copySize)
1846 cb.LowPart -= bytesRead;
1850 pcbRead->
u.LowPart = totalBytesRead.
LowPart;
1851 pcbRead->
u.HighPart = totalBytesRead.
HighPart;
1856 pcbWritten->
u.LowPart = totalBytesWritten.
LowPart;
1857 pcbWritten->
u.HighPart = totalBytesWritten.
HighPart;
#define InterlockedIncrement
#define InterlockedDecrement
#define UlongToHandle(ul)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
#define GetProcAddress(x, y)
#define CreateFileA(a, b, c, d, e, f, g)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, BOOL Own, void **ppvObj)
HRESULT WINAPI OleLoadPicturePath(LPOLESTR szURLorPath, LPUNKNOWN punkCaller, DWORD dwReserved, OLE_COLOR clrReserved, REFIID riid, LPVOID *ppvRet)
HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLsizei GLuint GLint * bytesWritten
GLenum const GLfloat * params
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
static const WCHAR emptyW[]
static ERESOURCE GlobalLock
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define seekto(pos, errstr)
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static ULONG WINAPI NoStatStreamImpl_Release(IStream *iface)
static void test_metafile(void)
static HRESULT WINAPI NoStatStreamImpl_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static void test_himetric(void)
static const unsigned char apmdata[]
static void test_load_save_empty_picture(void)
static HRESULT WINAPI NoStatStreamImpl_Revert(IStream *iface)
static HRESULT WINAPI NoStatStreamImpl_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
#define ok_ole_success(hr, func)
static HRESULT WINAPI NoStatStreamImpl_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static void test_Render(void)
static const unsigned char metafile[]
static void test_load_save_dib(void)
static void test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
static void test_empty_image_2(void)
static const unsigned char gifimage[35]
static void test_get_Attributes(void)
static HRESULT picture_render(IPicture *iface, HDC hdc, LONG x, LONG y, LONG cx, LONG cy, OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc, OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc, const RECT *bounds)
static IStream * NoStatStream_Construct(HGLOBAL hGlobal)
static void test_Invoke(void)
static void test_load_save_icon(void)
static const unsigned char bmpimage[66]
static HRESULT WINAPI NoStatStreamImpl_Clone(IStream *iface, IStream **ppstm)
#define expect_eq(expr, value, type, format)
static NoStatStreamImpl * impl_from_IStream(IStream *iface)
static ULONG WINAPI NoStatStreamImpl_AddRef(IStream *iface)
static void test_get_Handle(void)
static void NoStatStreamImpl_Destroy(NoStatStreamImpl *This)
static HRESULT WINAPI NoStatStreamImpl_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI NoStatStreamImpl_Commit(IStream *iface, DWORD grfCommitFlags)
static void test_get_Type(void)
static void test_load_save_bmp(void)
static void delete_render_dc(HDC dc)
static HRESULT WINAPI NoStatStreamImpl_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static void test_OleLoadPicturePath(void)
static HRESULT WINAPI NoStatStreamImpl_QueryInterface(IStream *iface, REFIID riid, void **ppvObject)
static void test_OleCreatePictureIndirect(void)
static HDC create_render_dc(void)
static const unsigned char pngimage[285]
static void test_enhmetafile(void)
#define ole_expect(expr, expect)
static const unsigned char enhmetafile[]
static HRESULT WINAPI NoStatStreamImpl_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static const unsigned char jpgimage[285]
static void test_empty_image(void)
static HRESULT create_picture(short type, IPicture **pict)
static HRESULT WINAPI NoStatStreamImpl_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
static void test_apm(void)
static HRESULT WINAPI NoStatStreamImpl_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static const unsigned char gif4pixel[42]
static void test_pic(const unsigned char *imgdata, unsigned int imgsize)
static const IStreamVtbl NoStatStreamImpl_Vtbl
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
interface IStream * LPSTREAM
BSTR WINAPI SysAllocString(LPCOLESTR str)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
#define PICTYPE_UNINITIALIZED
#define CTL_E_PATHFILEACCESSERROR
#define PICTYPE_ENHMETAFILE
#define DISPID_PICT_RENDER
struct tagPICTDESC PICTDESC
#define CTL_E_FILENOTFOUND
#define CTL_E_INVALIDPROPERTYVALUE
const GUID IID_IPictureDisp
const GUID IID_IPersistStream
_Out_opt_ int _Out_opt_ int * cy
#define IsEqualIID(riid1, riid2)
_In_ size_t const maxsize
ULARGE_INTEGER streamSize
ULARGE_INTEGER currentPosition
struct _ULARGE_INTEGER::@4623 u
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
#define STG_E_INVALIDPOINTER
#define DISP_E_BADPARAMCOUNT
#define DISP_E_MEMBERNOTFOUND
#define INET_E_RESOURCE_NOT_FOUND
#define INET_E_UNKNOWN_PROTOCOL
#define DISP_E_TYPEMISMATCH
#define DISP_E_PARAMNOTOPTIONAL
#define STG_E_INVALIDFUNCTION
#define DISP_E_UNKNOWNNAME
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HDC WINAPI CreateMetaFileA(_In_opt_ LPCSTR)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HMETAFILE WINAPI CloseMetaFile(_In_ HDC hdc)
HDC WINAPI CreateEnhMetaFileA(_In_opt_ HDC, _In_opt_ LPCSTR, _In_opt_ LPCRECT, _In_opt_ LPCSTR)
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HICON WINAPI CreateIcon(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ BYTE, _In_ BYTE, _In_ const BYTE *, _In_ const BYTE *)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)