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;
599 TRACE(
"(%p)->(%p): width is %d\n",
This, pwidth,
This->himetricWidth);
600 *pwidth =
This->himetricWidth;
611 TRACE(
"(%p)->(%p): height is %d\n",
This, pheight,
This->himetricHeight);
612 *pheight =
This->himetricHeight;
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);
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;
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);
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);
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);
unsigned int loadtime_magic
#define CTL_E_FILENOTFOUND
#define DISP_E_UNKNOWNNAME
static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
GLint GLint GLsizei width
#define PICTYPE_UNINITIALIZED
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
static HRESULT WINAPI OLEPictureImpl_IDispatch_QueryInterface(IDispatch *iface, REFIID riid, VOID **ppvoid)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
static OLE_YSIZE_HIMETRIC ypixels_to_himetric(INT pixels, HDC hdc)
static OLE_XSIZE_HIMETRIC xpixels_to_himetric(INT pixels, HDC hdc)
#define DISPATCH_PROPERTYGET
#define HRESULT_FROM_WIN32(x)
static HRESULT WINAPI OLEPictureImpl_QueryInterface(IPicture *iface, REFIID riid, void **ppvObject)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
OLE_XSIZE_HIMETRIC himetricWidth
BITMAPINFOHEADER bmiHeader
static IClassFactoryImpl STDPIC_CF
static HRESULT WINAPI OLEPictureImpl_get_KeepOriginalFormat(IPicture *iface, BOOL *pfKeep)
static HRESULT WINAPI OLEPictureImpl_SelectPicture(IPicture *iface, HDC hdcIn, HDC *phdcOut, OLE_HANDLE *phbmpOut)
static ULONG WINAPI OLEPictureImpl_IConnectionPointContainer_Release(IConnectionPointContainer *iface)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)
static ULONG WINAPI OLEPictureImpl_IPersistStream_Release(IPersistStream *iface)
const GUID IID_IPictureDisp
#define BITMAP_FORMAT_JPEG
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
#define CONNECT_E_NOCONNECTION
#define BITMAP_FORMAT_GIF
static ULONG WINAPI SPCF_Release(LPCLASSFACTORY iface)
#define DISP_E_MEMBERNOTFOUND
struct tagPICTDESC::@3137::@3139 wmf
const GUID IID_IConnectionPointContainer
static ULONG WINAPI OLEPictureImpl_IPersistStream_AddRef(IPersistStream *iface)
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
struct _APM_HEADER APM_HEADER
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
GLint GLint GLint GLint GLint x
static HRESULT WINAPI OLEPictureImpl_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
interface IStream * LPSTREAM
WINE_DEFAULT_DEBUG_CHANNEL(olepicture)
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
#define INVALID_FILE_SIZE
CURSORICONFILEDIRENTRY idEntries[1]
static HRESULT WINAPI OLEPictureImpl_get_hPal(IPicture *iface, OLE_HANDLE *phandle)
static void OLEPictureImpl_Destroy(OLEPictureImpl *Obj)
void WINAPI VariantInit(VARIANTARG *pVarg)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
static HRESULT WINAPI OLEPictureImpl_Save(IPersistStream *iface, IStream *pStm, BOOL fClearDirty)
static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface, OLE_HANDLE *phandle)
HRESULT WINAPI DispGetIDsOfNames(ITypeInfo *ptinfo, OLECHAR **rgszNames, UINT cNames, DISPID *rgdispid)
int const JOCTET unsigned int datalen
static HRESULT WINAPI OLEPictureImpl_set_hPal(IPicture *iface, OLE_HANDLE hpal)
static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface, IStream *stream, BOOL mem_copy, LONG *size)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
static LPVOID *static DWORD
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)
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)
static HRESULT WINAPI OLEPictureImpl_get_Height(IPicture *iface, OLE_YSIZE_HIMETRIC *pheight)
GLsizei GLenum GLboolean sink
static void OLEPictureImpl_SetIcon(OLEPictureImpl *This)
struct tagIClassFactoryImpl IClassFactoryImpl
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
GLenum GLuint GLenum GLsizei const GLchar * buf
static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream *iface, IStream *pStm)
static HRESULT OLEPictureImpl_LoadIcon(OLEPictureImpl *This, BYTE *xbuf, ULONG xread)
static HRESULT WINAPI OLEPictureImpl_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)
HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
static ULONG WINAPI OLEPictureImpl_Release(IPicture *iface)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
static HRESULT WINAPI OLEPictureImpl_EnumConnectionPoints(IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
int WINAPI SetMapMode(_In_ HDC, _In_ int)
static ULONG WINAPI OLEPictureImpl_IDispatch_Release(IDispatch *iface)
static struct _test_info info[]
static const IClassFactoryVtbl SPCF_Vtbl
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define BITMAP_FORMAT_BMP
_Out_opt_ int _Out_opt_ int * cy
static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable
HRESULT WINAPI OleLoadPictureEx(LPSTREAM lpstream, LONG lSize, BOOL fRunmode, REFIID riid, DWORD xsiz, DWORD ysiz, DWORD flags, LPVOID *ppvObj)
HRESULT WINAPI OleLoadPicture(LPSTREAM lpstream, LONG lSize, BOOL fRunmode, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI OLEPictureImpl_get_Width(IPicture *iface, OLE_XSIZE_HIMETRIC *pwidth)
static BOOL serializeBMP(HBITMAP hBitmap, void **ppBuffer, unsigned int *pLength)
#define DISPID_PICT_RENDER
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSource *src)
#define DISPATCH_PROPERTYPUT
#define ERROR_FILE_NOT_FOUND
static OLEPictureImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static OLEPictureImpl * impl_from_IDispatch(IDispatch *iface)
static HRESULT WINAPI OLEPictureImpl_GetTypeInfoCount(IDispatch *iface, unsigned int *pctinfo)
struct OLEPictureImpl OLEPictureImpl
static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
#define DISP_E_TYPEMISMATCH
static BOOL serializeEMF(HENHMETAFILE hemf, void **buf, unsigned *size)
#define PICTYPE_ENHMETAFILE
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
static ULONG WINAPI OLEPictureImpl_IConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
static HRESULT WINAPI SPCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
IDispatch IDispatch_iface
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)
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)
static OLEPictureImpl * impl_from_IPicture(IPicture *iface)
static HRESULT WINAPI OLEPictureImpl_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, VOID **ppvoid)
const char * wine_dbgstr_rect(const RECT *rect)
IConnectionPointContainer IConnectionPointContainer_iface
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)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
#define success(from, fromstr, to, tostr)
static HRESULT WINAPI OLEPictureImpl_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static HRESULT WINAPI OLEPictureImpl_put_KeepOriginalFormat(IPicture *iface, BOOL keep)
_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)
const GUID IID_IPersistStream
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)
UINT WINAPI GetEnhMetaFileHeader(_In_ HENHMETAFILE hemf, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader)
static ULONG WINAPI SPCF_AddRef(LPCLASSFACTORY iface)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, BOOL Own, void **ppvObj)
#define InterlockedDecrement
#define DISP_E_PARAMNOTOPTIONAL
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
OLE_YSIZE_HIMETRIC himetricHeight
#define memcpy(s1, s2, n)
REFIID LPVOID * ppvObject
HRESULT WINAPI OleSavePictureFile(IDispatch *picture, BSTR filename)
static ULONG WINAPI OLEPictureImpl_AddRef(IPicture *iface)
static BOOL serializeIcon(HICON hIcon, void **ppBuffer, unsigned int *pLength)
GLint GLint GLsizei GLsizei height
#define DISPID_PICT_HANDLE
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
_In_ DWORD _Out_ _In_ WORD wFlags
static void OLEPicture_SendNotify(OLEPictureImpl *this, DISPID dispID)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
static HRESULT OLEPictureImpl_LoadEnhMetafile(OLEPictureImpl *This, const BYTE *data, ULONG size)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define BITMAP_FORMAT_APM
const GUID IID_IConnectionPoint
struct stdole::EXCEPINFO EXCEPINFO
static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface, short *ptype)
static VARIANTARG static DISPID
HRESULT WINAPI OleLoadPicturePath(LPOLESTR szURLorPath, LPUNKNOWN punkCaller, DWORD dwReserved, OLE_COLOR clrReserved, REFIID riid, LPVOID *ppvRet)
#define InterlockedIncrement
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
BOOL WINAPI DeleteDC(_In_ HDC)
interface IPersistStream * LPPERSISTSTREAM
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
static OLEPictureImpl * impl_from_IPersistStream(IPersistStream *iface)
static HRESULT WINAPI SPCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface, DWORD *pdwAttr)
const GUID IID_IPropertyNotifySink
#define ReadFile(a, b, c, d, e)
void _get_STDPIC_CF(LPVOID *ppv)
unsigned int loadtime_format
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
GLint GLint GLint GLint GLint GLint y
#define DISP_E_BADPARAMCOUNT
#define BITMAP_FORMAT_PNG
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
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)
static HRESULT WINAPI OLEPictureImpl_get_CurDC(IPicture *iface, HDC *phdc)
struct stdole::DISPPARAMS DISPPARAMS
static HRESULT OLEPictureImpl_LoadAPM(OLEPictureImpl *This, const BYTE *data, ULONG size)
static HRESULT WINAPI OLEPictureImpl_IsDirty(IPersistStream *iface)
#define DISPID_PICT_WIDTH
static HRESULT WINAPI OLEPictureImpl_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *pcbSize)
static HRESULT WINAPI OLEPictureImpl_IConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, VOID **ppvoid)
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
static ClassFactoryImpl factory
#define CTL_E_INVALIDPROPERTYVALUE
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
#define DISPID_PICT_HEIGHT
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable
const GUID CLSID_StdPicture
static HRESULT OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn, OLEPictureImpl **pict)
static void OLEPictureImpl_SetEMF(OLEPictureImpl *This)
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
static void OLEPictureImpl_SetBitmap(OLEPictureImpl *This)
static HRESULT WINAPI OLEPictureImpl_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
static HRESULT WINAPI SPCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
#define HeapFree(x, y, z)
static HRESULT WINAPI OLEPictureImpl_GetClassID(IPersistStream *iface, CLSID *pClassID)
BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE)
#define IsEqualIID(riid1, riid2)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
#define CTL_E_PATHFILEACCESSERROR
static VOID NTAPI 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)
IPersistStream IPersistStream_iface
static const IPictureVtbl OLEPictureImpl_VTable
static HRESULT OLEPictureImpl_LoadWICDecoder(OLEPictureImpl *This, REFCLSID decoder_clsid, BYTE *xbuf, ULONG xread)
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
static HRESULT create_stream(const WCHAR *filename, IStream **stream)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
static ULONG WINAPI OLEPictureImpl_IDispatch_AddRef(IDispatch *iface)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)