44#define NONAMELESSUNION
62#define BITMAP_FORMAT_BMP 0x4d42
63#define BITMAP_FORMAT_JPEG 0xd8ff
64#define BITMAP_FORMAT_GIF 0x4947
65#define BITMAP_FORMAT_PNG 0x5089
66#define BITMAP_FORMAT_APM 0xcdd7
204 TRACE(
"bitmap handle %p\n",
This->desc.u.bmp.hbitmap);
205 if(
GetObjectW(
This->desc.u.bmp.hbitmap,
sizeof(bm), &bm) !=
sizeof(bm)) {
206 ERR(
"GetObject fails\n");
209 This->origWidth = bm.bmWidth;
210 This->origHeight = bm.bmHeight;
212 TRACE(
"width %d, height %d, bpp %d\n", bm.bmWidth, bm.bmHeight, bm.bmBitsPixel);
233 TRACE(
"icon handle %p\n",
This->desc.u.icon.hicon);
240 ERR(
"GetObject fails on icon bitmap\n");
244 This->origWidth = bm.bmWidth;
245 This->origHeight = infoIcon.
hbmColor ? bm.bmHeight : bm.bmHeight / 2;
257 ERR(
"GetIconInfo() fails on icon %p\n",
This->desc.u.icon.hicon);
268 This->origHeight = 0;
321 newObject->
fOwn = fOwn;
333 newObject->
desc = *pictDesc;
341 TRACE(
"metafile handle %p\n", pictDesc->u.
wmf.hmeta);
368 TRACE(
"returning %p\n", newObject);
384 IConnectionPoint_Release(
Obj->pCP);
387 switch(
Obj->desc.picType) {
407 FIXME(
"Unsupported type %d - unable to delete\n",
Obj->desc.picType);
427 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount - 1);
443 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount + 1);
489 IPicture_AddRef(iface);
505 if (IConnectionPoint_EnumConnections(this->pCP, &pEnum) !=
S_OK)
507 while(IEnumConnections_Next(pEnum, 1, &CD,
NULL) ==
S_OK) {
511 IPropertyNotifySink_OnChanged(
sink, dispID);
512 IPropertyNotifySink_Release(
sink);
513 IUnknown_Release(CD.pUnk);
515 IEnumConnections_Release(pEnum);
530 switch(
This->desc.picType) {
548 FIXME(
"Unimplemented type %d\n",
This->desc.picType);
551 TRACE(
"returning handle %08x\n", *phandle);
583 TRACE(
"(%p)->(%p): type is %d\n",
This, ptype,
This->desc.picType);
588 *ptype =
This->desc.picType;
596 OLE_XSIZE_HIMETRIC *pwidth)
599 TRACE(
"(%p)->(%p): width is %d\n",
This, pwidth,
This->himetricWidth);
600 *pwidth =
This->himetricWidth;
608 OLE_YSIZE_HIMETRIC *pheight)
611 TRACE(
"(%p)->(%p): height is %d\n",
This, pheight,
This->himetricHeight);
612 *pheight =
This->himetricHeight;
618 OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc,
HBITMAP hbmMask,
HBITMAP hbmXor)
639 StretchBlt(
hdc,
x,
y,
cx,
cy, hdcBmp, xSrc, ySrc, cxSrc, cySrc,
SRCAND);
644 StretchBlt(
hdc,
x,
y,
cx,
cy, hdcBmp, xSrc, ySrc, cxSrc, cySrc,
SRCPAINT);
652 StretchBlt(
hdc,
x,
y,
cx,
cy, hdcBmp, xSrc, ySrc, cxSrc, cySrc,
SRCCOPY);
663 OLE_XPOS_HIMETRIC xSrc,
664 OLE_YPOS_HIMETRIC ySrc,
665 OLE_XSIZE_HIMETRIC cxSrc,
666 OLE_YSIZE_HIMETRIC cySrc,
670 TRACE(
"(%p)->(%p, (%d,%d), (%d,%d) <- (%d,%d), (%d,%d), %p)\n",
671 This,
hdc,
x,
y,
cx,
cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds);
675 if(
cx == 0 ||
cy == 0 || cxSrc == 0 || cySrc == 0){
685 switch(
This->desc.picType) {
696 hbmMask =
This->hbmMask;
697 hbmXor =
This->hbmXor;
702 hbmXor =
This->desc.u.bmp.hbitmap;
705 render_masked_bitmap(
This,
hdc,
x,
y,
cx,
cy, xSrc, ySrc, cxSrc, cySrc, hbmMask, hbmXor);
716 render_masked_bitmap(
This,
hdc,
x,
y,
cx,
cy, xSrc, ySrc, cxSrc, cySrc,
info.hbmMask,
info.hbmColor);
725 POINT prevOrg, prevWndOrg;
726 SIZE prevExt, prevWndExt;
740 ERR(
"PlayMetaFile failed!\n");
760 FIXME(
"type %d not implemented\n",
This->desc.picType);
794 if (phdc) *phdc =
This->hDCCur;
804 OLE_HANDLE *phbmpOut)
807 TRACE(
"(%p)->(%p, %p, %p)\n",
This, hdcIn, phdcOut, phbmpOut);
810 *phdcOut =
This->hDCCur;
813 This->hDCCur = hdcIn;
818 FIXME(
"Don't know how to select picture type %d\n",
This->desc.picType);
833 *pfKeep =
This->keepOrigFormat;
845 This->keepOrigFormat = keep;
875 switch (
This->desc.picType) {
879 case PICTYPE_ICON: *pdwAttr = PICTURE_TRANSPARENT;
break;
881 case PICTYPE_METAFILE: *pdwAttr = PICTURE_TRANSPARENT|PICTURE_SCALABLE;
break;
882 default:
FIXME(
"Unknown pictype %d\n",
This->desc.picType);
break;
898 return IPicture_QueryInterface(&
This->IPicture_iface,
riid,ppvoid);
906 return IPicture_AddRef(&
This->IPicture_iface);
914 return IPicture_Release(&
This->IPicture_iface);
960 return IPicture_QueryInterface(&
This->IPicture_iface,
riid, ppvoid);
973 return IPicture_AddRef(&
This->IPicture_iface);
986 return IPicture_Release(&
This->IPicture_iface);
995 TRACE(
"(%p)\n", pClassID);
1027 hr = IWICBitmapSource_GetSize(real_source, &
width, &
height);
1030 bih.
biSize =
sizeof(bih);
1053 if (
This->desc.u.bmp.hbitmap == 0)
1063 hr = IWICBitmapSource_CopyPixels(real_source, &rc,
stride, buffersize,
bits);
1077 if((*pixel & 0x80000000) == 0)
1089 HDC hdcref, hdcBmp, hdcXor, hdcMask;
1090 HBITMAP hbmoldBmp, hbmoldXor, hbmoldMask;
1128 IWICBitmapSource_Release(real_source);
1144 &IID_IWICImagingFactory, (
void**)&
factory);
1148 IWICImagingFactory_Release(
factory);
1153 hr = IWICStream_InitializeFromMemory(
stream, xbuf, xread);
1158 &IID_IWICBitmapDecoder, (
void**)&decoder);
1164 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
1166 IWICBitmapDecoder_Release(decoder);
1170 IWICStream_Release(
stream);
1176 IWICBitmapFrameDecode_Release(framedecode);
1194 TRACE(
"(this %p, xbuf %p, xread %u)\n",
This, xbuf, xread);
1216 ERR(
"Invalid icon count of zero.\n");
1232 ERR(
"Icon data address %u is over %u bytes available.\n",
1265 ERR(
"CreateIcon failed.\n");
1269 This->desc.u.icon.hicon = hicon;
1287 if (!hemf)
return E_FAIL;
1292 This->desc.u.emf.hemf = hemf;
1294 This->origWidth = 0;
1295 This->origHeight = 0;
1296 This->himetricWidth =
hdr.rclFrame.right -
hdr.rclFrame.left;
1297 This->himetricHeight =
hdr.rclFrame.bottom -
hdr.rclFrame.top;
1310 if (
header->key != 0x9ac6cdd7)
1318 This->desc.u.wmf.hmeta = hmf;
1319 This->desc.u.wmf.xExt = 0;
1320 This->desc.u.wmf.yExt = 0;
1322 This->origWidth = 0;
1323 This->origHeight = 0;
1343 ULONG xread, toread;
1369 hr = IStream_Stat(pStm,&statstg,STATFLAG_NONAME);
1371 TRACE(
"stat failed with hres %x, proceeding to read all data.\n",
hr);
1374 statstg.cbSize.QuadPart = 8;
1379 headerisdata =
FALSE;
1381 hr = IStream_Read(pStm,
header, 8, &xread);
1382 if (
hr !=
S_OK || xread!=8) {
1383 ERR(
"Failure while reading picture header (hr is %x, nread is %d).\n",
hr,xread);
1386 headerread += xread;
1389 if (!
memcmp(&(
header[0]),
"lt\0\0", 4) && (statfailed || (
header[1] + headerread <= statstg.cbSize.QuadPart))) {
1390 if (toread != 0 && toread !=
header[1])
1391 FIXME(
"varying lengths of image data (prev=%u curr=%u), only last one will be used\n",
1396 statstg.cbSize.QuadPart =
header[1] + 8;
1399 if (toread == 0)
break;
1405 (
header[0] == 0x10000) ||
1406 (
header[0] == 0x20000) ||
1407 (
header[1] > statstg.cbSize.QuadPart)||
1410 headerisdata =
TRUE;
1412 toread = statstg.cbSize.QuadPart-8;
1416 FIXME(
"Unknown stream header magic: %08x\n",
header[0]);
1420 }
while (!headerisdata);
1423 unsigned int sizeinc = 4096;
1424 unsigned int origsize = sizeinc;
1427 TRACE(
"Reading all data from stream.\n");
1432 while (xread < origsize) {
1433 hr = IStream_Read(pStm,xbuf+xread,origsize-xread,&nread);
1435 if (
hr !=
S_OK || !nread)
1438 if (!nread ||
hr !=
S_OK)
1440 if (xread == origsize) {
1441 origsize += sizeinc;
1442 sizeinc = 2*sizeinc;
1447 TRACE(
"hr in no-stat loader case is %08x\n",
hr);
1448 TRACE(
"loaded %d bytes.\n", xread);
1449 This->datalen = xread;
1452 This->datalen = toread+(headerisdata?8:0);
1460 while (xread < This->
datalen) {
1462 hr = IStream_Read(pStm,xbuf+xread,
This->datalen-xread,&nread);
1464 if (
hr !=
S_OK || !nread)
1467 if (xread !=
This->datalen)
1468 ERR(
"Could only read %d of %d bytes out of stream?\n",xread,
This->datalen);
1470 if (
This->datalen == 0) {
1480 magic = xbuf[0] + (xbuf[1]<<8);
1481 This->loadtime_format = magic;
1511 FIXME(
"Unknown magic %04x, %d read bytes:\n",magic,xread);
1513 for (
i=0;
i<xread+8;
i++) {
1535 int iNumPaletteEntries;
1536 unsigned char * pPixelData;
1556 if (iNumPaletteEntries > 256) iNumPaletteEntries = 256;
1561 iNumPaletteEntries = 0;
1566 iNumPaletteEntries *
sizeof(
RGBQUAD) +
1571 pFileHeader = *ppBuffer;
1573 pFileHeader->
bfSize = *pLength;
1577 iNumPaletteEntries *
sizeof(
RGBQUAD);
1583 (
unsigned char *)(*ppBuffer) +
1586 iNumPaletteEntries *
sizeof(
RGBQUAD),
1600 *ppBuffer =
NULL; *pLength = 0;
1604 unsigned char * pIconData =
NULL;
1605 unsigned int iDataSize = 0;
1618 unsigned int iOffsetPalette;
1619 unsigned int iOffsetColorData;
1620 unsigned int iOffsetMaskData;
1622 unsigned int iLengthScanLineMask;
1623 unsigned int iNumEntriesPalette;
1662 *pIconBitmapHeader = pInfoBitmap->
bmiHeader;
1669 if (iNumEntriesPalette > 256) iNumEntriesPalette = 256;
1672 iNumEntriesPalette = 3;
1676 iNumEntriesPalette = 0;
1680 iOffsetPalette = iDataSize;
1681 iDataSize += iNumEntriesPalette *
sizeof(
DWORD);
1682 iOffsetColorData = iDataSize;
1684 iOffsetMaskData = iDataSize;
1685 iDataSize += pIconBitmapHeader->
biHeight * iLengthScanLineMask;
1696 if (iNumEntriesPalette > 0) {
1698 iNumEntriesPalette *
sizeof(
RGBQUAD));
1702 memset(pIconData + iOffsetMaskData, 0, iDataSize - iOffsetMaskData);
1719 *ppBuffer = pIconData; *pLength = iDataSize;
1740 printf(
"ERROR: Unable to get icon information (error %u)\n",
1762 unsigned int iDataSize;
1768 TRACE(
"%p %p %d\n",
This, pStm, fClearDirty);
1770 switch (
This->desc.picType) {
1778 if (
This->bIsDirty || !
This->data) {
1780 ERR(
"(%p,%p,%d), serializeIcon() failed\n",
This, pStm, fClearDirty);
1785 This->data = pIconData;
1786 This->datalen = iDataSize;
1789 header[0] = (
This->loadtime_magic != 0xdeadbeef) ?
This->loadtime_magic : 0x0000746c;
1796 if (
This->bIsDirty || !
This->data) {
1799 serializeResult =
serializeBMP(
This->desc.u.bmp.hbitmap, &pIconData, &iDataSize);
1802 FIXME(
"(%p,%p,%d), PICTYPE_BITMAP (format JPEG) not implemented!\n",
This,pStm,fClearDirty);
1805 FIXME(
"(%p,%p,%d), PICTYPE_BITMAP (format GIF) not implemented!\n",
This,pStm,fClearDirty);
1808 FIXME(
"(%p,%p,%d), PICTYPE_BITMAP (format PNG) not implemented!\n",
This,pStm,fClearDirty);
1811 FIXME(
"(%p,%p,%d), PICTYPE_BITMAP (format UNKNOWN, using BMP?) not implemented!\n",
This,pStm,fClearDirty);
1815 if (!serializeResult)
1822 This->data = pIconData;
1823 This->datalen = iDataSize;
1826 header[0] = (
This->loadtime_magic != 0xdeadbeef) ?
This->loadtime_magic : 0x0000746c;
1836 serializeResult =
serializeEMF(
This->desc.u.emf.hemf, &pIconData, &iDataSize);
1837 if (!serializeResult)
1844 This->data = pIconData;
1845 This->datalen = iDataSize;
1855 FIXME(
"(%p,%p,%d), PICTYPE_METAFILE not implemented!\n",
This,pStm,fClearDirty);
1858 FIXME(
"(%p,%p,%d), [unknown type] not implemented!\n",
This,pStm,fClearDirty);
1887 switch (
This->desc.picType)
1893 if (!mem_copy)
return E_FAIL;
1901 This->datalen = data_size;
1908 if (!mem_copy)
return E_FAIL;
1919 FIXME(
"BITMAP_FORMAT_JPEG is not implemented\n");
1922 FIXME(
"BITMAP_FORMAT_GIF is not implemented\n");
1925 FIXME(
"BITMAP_FORMAT_PNG is not implemented\n");
1928 FIXME(
"PICTYPE_BITMAP/%#x is not implemented\n",
This->loadtime_format);
1934 This->datalen = data_size;
1941 FIXME(
"PICTYPE_METAFILE is not implemented\n");
1945 if (!mem_copy)
return E_FAIL;
1953 This->datalen = data_size;
1960 FIXME(
"%#x is not implemented\n",
This->desc.picType);
1982 return IPicture_QueryInterface(&
This->IPicture_iface,
riid, ppvoid);
1995 return IPicture_AddRef(&
This->IPicture_iface);
2008 return IPicture_Release(&
This->IPicture_iface);
2018 unsigned int* pctinfo)
2020 TRACE(
"(%p)\n", pctinfo);
2038 static const WCHAR stdole2tlb[] = {
's',
't',
'd',
'o',
'l',
'e',
'2',
'.',
't',
'l',
'b',0};
2042 TRACE(
"(iTInfo=%d, lcid=%04x, %p)\n", iTInfo, (
int)lcid, ppTInfo);
2050 ERR(
"Could not load stdole2.tlb\n");
2056 ERR(
"Did not get IPictureDisp typeinfo from typelib, hres %x\n",
hres);
2078 rgszNames, cNames, (
int)lcid, rgDispId);
2091 ERR(
"GetTypeInfo failed.\n");
2097 ITypeInfo_Release(pTInfo);
2114 DISPPARAMS* pDispParams,
2116 EXCEPINFO* pExepInfo,
2132 ERR(
"null pDispParams not allowed\n");
2138 if (pDispParams->cArgs != 0)
2140 ERR(
"param count for DISPATCH_PROPERTYGET was %d instead of 0\n", pDispParams->cArgs);
2145 ERR(
"null pVarResult not allowed when DISPATCH_PROPERTYGET specified\n");
2151 if (pDispParams->cArgs != 1)
2153 ERR(
"param count for DISPATCH_PROPERTYPUT was %d instead of 1\n", pDispParams->cArgs);
2158 switch (dispIdMember)
2163 TRACE(
"DISPID_PICT_HANDLE\n");
2165 return IPicture_get_Handle(&
This->IPicture_iface, &
V_UINT(pVarResult));
2171 TRACE(
"DISPID_PICT_HPAL\n");
2173 return IPicture_get_hPal(&
This->IPicture_iface, &
V_UINT(pVarResult));
2179 TRACE(
"DISPID_PICT_HPAL\n");
2186 hr = IPicture_set_hPal(&
This->IPicture_iface,
V_I4(&vararg));
2195 TRACE(
"DISPID_PICT_TYPE\n");
2203 TRACE(
"DISPID_PICT_WIDTH\n");
2205 return IPicture_get_Width(&
This->IPicture_iface, &
V_I4(pVarResult));
2211 TRACE(
"DISPID_PICT_HEIGHT\n");
2213 return IPicture_get_Height(&
This->IPicture_iface, &
V_I4(pVarResult));
2222 TRACE(
"DISPID_PICT_RENDER\n");
2224 if (pDispParams->cArgs != 10)
2228 for (
i = 0;
i < pDispParams->cArgs;
i++)
2231 ERR(
"DISPID_PICT_RENDER: wrong argument type %d:%d\n",
i,
V_VT(&
args[
i]));
2237 return IPicture_Render(&
This->IPicture_iface,
2252 ERR(
"invalid dispid 0x%x or wFlags 0x%x\n", dispIdMember,
wFlags);
2314 BOOL Own,
void **ppvObj )
2351 TRACE(
"(%p,%d,%d,%s,%p), partially implemented.\n",
2359 ERR(
"Could not get IPersistStream iface from Ole Picture?\n");
2360 IPicture_Release(newpic);
2364 hr = IPersistStream_Load(ps,lpstream);
2365 IPersistStream_Release(ps);
2368 ERR(
"IPersistStream_Load failed\n");
2369 IPicture_Release(newpic);
2373 hr = IPicture_QueryInterface(newpic,
riid,ppvObj);
2376 IPicture_Release(newpic);
2390 FIXME(
"(%p,%d,%d,%s,x=%d,y=%d,f=%x,%p), partially implemented.\n",
2398 ERR(
"Could not get IPersistStream iface from Ole Picture?\n");
2399 IPicture_Release(newpic);
2403 hr = IPersistStream_Load(ps,lpstream);
2404 IPersistStream_Release(ps);
2407 ERR(
"IPersistStream_Load failed\n");
2408 IPicture_Release(newpic);
2412 hr = IPicture_QueryInterface(newpic,
riid,ppvObj);
2415 IPicture_Release(newpic);
2501 static const WCHAR file[] = {
'f',
'i',
'l',
'e',
':',0 };
2504 WCHAR *file_candidate;
2507 TRACE(
"(%s,%p,%d,%08x,%s,%p): stub\n",
2511 if (!szURLorPath || !ppvRet)
2524 file_candidate = path_buf;
2527 file_candidate = szURLorPath;
2530 if (file_candidate[1] ==
':') {
2533 return INET_E_RESOURCE_NOT_FOUND;
2544 hRes = IMoniker_BindToStorage(pmnk, pbc,
NULL, &IID_IStream, (
LPVOID*)&
stream);
2545 IMoniker_Release(pmnk);
2547 IBindCtx_Release(pbc);
2605 FIXME(
"(%p)->(%d),stub!\n",
This,dolock);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI DispGetIDsOfNames(ITypeInfo *ptinfo, OLECHAR **rgszNames, UINT cNames, DISPID *rgdispid)
static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface, short *ptype)
static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable
static HRESULT WINAPI OLEPictureImpl_set_hPal(IPicture *iface, OLE_HANDLE hpal)
static HRESULT WINAPI OLEPictureImpl_IDispatch_QueryInterface(IDispatch *iface, REFIID riid, VOID **ppvoid)
static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface, OLE_HANDLE *phandle)
static OLE_YSIZE_HIMETRIC ypixels_to_himetric(INT pixels, HDC hdc)
static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSource *src)
static HRESULT OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn, OLEPictureImpl **pict)
static OLEPictureImpl * impl_from_IPicture(IPicture *iface)
static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
static HRESULT OLEPictureImpl_LoadWICDecoder(OLEPictureImpl *This, REFCLSID decoder_clsid, BYTE *xbuf, ULONG xread)
static ULONG WINAPI OLEPictureImpl_IPersistStream_Release(IPersistStream *iface)
static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable
static const IClassFactoryVtbl SPCF_Vtbl
HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, BOOL Own, void **ppvObj)
static HRESULT WINAPI OLEPictureImpl_Save(IPersistStream *iface, IStream *pStm, BOOL fClearDirty)
static void OLEPictureImpl_Destroy(OLEPictureImpl *Obj)
static HRESULT WINAPI OLEPictureImpl_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, LPCRECT prcWBounds)
static ULONG WINAPI OLEPictureImpl_IDispatch_Release(IDispatch *iface)
static HRESULT WINAPI OLEPictureImpl_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
static ULONG WINAPI SPCF_AddRef(LPCLASSFACTORY iface)
static ULONG WINAPI OLEPictureImpl_Release(IPicture *iface)
static HRESULT WINAPI OLEPictureImpl_SelectPicture(IPicture *iface, HDC hdcIn, HDC *phdcOut, OLE_HANDLE *phbmpOut)
#define BITMAP_FORMAT_JPEG
static ULONG WINAPI OLEPictureImpl_IDispatch_AddRef(IDispatch *iface)
static HRESULT WINAPI OLEPictureImpl_get_hPal(IPicture *iface, OLE_HANDLE *phandle)
static ULONG WINAPI SPCF_Release(LPCLASSFACTORY iface)
static HRESULT WINAPI OLEPictureImpl_put_KeepOriginalFormat(IPicture *iface, BOOL keep)
static IClassFactoryImpl STDPIC_CF
static HRESULT WINAPI OLEPictureImpl_QueryInterface(IPicture *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream *iface, IStream *pStm)
static OLEPictureImpl * impl_from_IDispatch(IDispatch *iface)
void _get_STDPIC_CF(LPVOID *ppv)
static HRESULT WINAPI OLEPictureImpl_IsDirty(IPersistStream *iface)
static BOOL serializeEMF(HENHMETAFILE hemf, void **buf, unsigned *size)
static HRESULT WINAPI SPCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
static void OLEPicture_SendNotify(OLEPictureImpl *this, DISPID dispID)
static void OLEPictureImpl_SetIcon(OLEPictureImpl *This)
static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable
static OLE_XSIZE_HIMETRIC xpixels_to_himetric(INT pixels, HDC hdc)
HRESULT WINAPI OleLoadPicturePath(LPOLESTR szURLorPath, LPUNKNOWN punkCaller, DWORD dwReserved, OLE_COLOR clrReserved, REFIID riid, LPVOID *ppvRet)
#define BITMAP_FORMAT_GIF
static BOOL serializeIcon(HICON hIcon, void **ppBuffer, unsigned int *pLength)
static HRESULT WINAPI OLEPictureImpl_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
HRESULT WINAPI OleSavePictureFile(IDispatch *picture, BSTR filename)
static void render_masked_bitmap(OLEPictureImpl *This, 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, HBITMAP hbmMask, HBITMAP hbmXor)
static HRESULT WINAPI OLEPictureImpl_IConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, VOID **ppvoid)
struct _APM_HEADER APM_HEADER
static HRESULT OLEPictureImpl_LoadIcon(OLEPictureImpl *This, BYTE *xbuf, ULONG xread)
static HRESULT WINAPI OLEPictureImpl_get_Height(IPicture *iface, OLE_YSIZE_HIMETRIC *pheight)
static void OLEPictureImpl_SetBitmap(OLEPictureImpl *This)
static const IPictureVtbl OLEPictureImpl_VTable
static ULONG WINAPI OLEPictureImpl_IPersistStream_AddRef(IPersistStream *iface)
static HRESULT WINAPI OLEPictureImpl_EnumConnectionPoints(IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
static HRESULT WINAPI OLEPictureImpl_GetTypeInfoCount(IDispatch *iface, unsigned int *pctinfo)
static HRESULT WINAPI OLEPictureImpl_get_Width(IPicture *iface, OLE_XSIZE_HIMETRIC *pwidth)
static void OLEPictureImpl_SetEMF(OLEPictureImpl *This)
static OLEPictureImpl * impl_from_IPersistStream(IPersistStream *iface)
#define BITMAP_FORMAT_APM
static HRESULT WINAPI SPCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI OLEPictureImpl_get_CurDC(IPicture *iface, HDC *phdc)
static ULONG WINAPI OLEPictureImpl_IConnectionPointContainer_Release(IConnectionPointContainer *iface)
static HRESULT WINAPI SPCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
static HRESULT WINAPI OLEPictureImpl_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *pcbSize)
static HRESULT WINAPI OLEPictureImpl_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
static ULONG WINAPI OLEPictureImpl_AddRef(IPicture *iface)
static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface, DWORD *pdwAttr)
static HRESULT WINAPI OLEPictureImpl_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, VOID **ppvoid)
static OLEPictureImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
static HRESULT OLEPictureImpl_LoadEnhMetafile(OLEPictureImpl *This, const BYTE *data, ULONG size)
#define BITMAP_FORMAT_PNG
HRESULT WINAPI OleLoadPicture(LPSTREAM lpstream, LONG lSize, BOOL fRunmode, REFIID riid, LPVOID *ppvObj)
static ULONG WINAPI OLEPictureImpl_IConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
static HRESULT OLEPictureImpl_LoadAPM(OLEPictureImpl *This, const BYTE *data, ULONG size)
static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface, IStream *stream, BOOL mem_copy, LONG *size)
static HRESULT WINAPI OLEPictureImpl_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
static BOOL serializeBMP(HBITMAP hBitmap, void **ppBuffer, unsigned int *pLength)
static HRESULT WINAPI OLEPictureImpl_get_KeepOriginalFormat(IPicture *iface, BOOL *pfKeep)
#define BITMAP_FORMAT_BMP
HRESULT WINAPI OleLoadPictureEx(LPSTREAM lpstream, LONG lSize, BOOL fRunmode, REFIID riid, DWORD xsiz, DWORD ysiz, DWORD flags, LPVOID *ppvObj)
static HRESULT WINAPI OLEPictureImpl_GetClassID(IPersistStream *iface, CLSID *pClassID)
static HRESULT create_stream(const WCHAR *filename, IStream **stream)
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
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 GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum GLboolean sink
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
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
int const JOCTET unsigned int datalen
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
static VARIANTARG static DISPID
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
interface IPersistStream * LPPERSISTSTREAM
interface IStream * LPSTREAM
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
#define PICTYPE_UNINITIALIZED
#define CTL_E_PATHFILEACCESSERROR
#define PICTYPE_ENHMETAFILE
#define DISPID_PICT_RENDER
#define DISPID_PICT_WIDTH
#define CTL_E_FILENOTFOUND
#define CONNECT_E_NOCONNECTION
#define CTL_E_INVALIDPROPERTYVALUE
#define DISPID_PICT_HANDLE
#define DISPID_PICT_HEIGHT
const GUID CLSID_StdPicture
const GUID IID_IConnectionPointContainer
const GUID IID_IConnectionPoint
const GUID IID_IPropertyNotifySink
const GUID IID_IPictureDisp
const GUID IID_IPersistStream
_Out_opt_ int _Out_opt_ int * cy
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
CURSORICONFILEDIRENTRY idEntries[1]
unsigned int loadtime_magic
IConnectionPointContainer IConnectionPointContainer_iface
OLE_YSIZE_HIMETRIC himetricHeight
IDispatch IDispatch_iface
OLE_XSIZE_HIMETRIC himetricWidth
unsigned int loadtime_format
IPersistStream IPersistStream_iface
BITMAPINFOHEADER bmiHeader
struct tagPICTDESC::@3188::@3190 wmf
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
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 success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
#define INVALID_FILE_SIZE
@ WICDecodeMetadataCacheOnLoad
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define DISP_E_BADPARAMCOUNT
#define DISP_E_MEMBERNOTFOUND
#define HRESULT_FROM_WIN32(x)
#define DISP_E_TYPEMISMATCH
#define DISP_E_PARAMNOTOPTIONAL
#define DISP_E_UNKNOWNNAME
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
int WINAPI SetMapMode(_In_ HDC, _In_ int)
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
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)
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
UINT WINAPI GetEnhMetaFileHeader(_In_ HENHMETAFILE hemf, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader)
BOOL WINAPI DeleteDC(_In_ HDC)
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE)
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
HICON WINAPI CreateIconFromResourceEx(_In_reads_bytes_(dwResSize) PBYTE presbits, _In_ DWORD dwResSize, _In_ BOOL fIcon, _In_ DWORD dwVer, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT Flags)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)