Commit 16d785d4 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

shell32: Return stub bitmap in IShellItemImageFactory::GetImage.

parent 6e51e083
......@@ -569,13 +569,26 @@ static HRESULT WINAPI ShellItem_IShellItemImageFactory_GetImage(IShellItemImageF
SIZE size, SIIGBF flags, HBITMAP *phbm)
{
ShellItem *This = impl_from_IShellItemImageFactory(iface);
static const BITMAPINFOHEADER dummy_bmi_header = {
.biSize = sizeof(dummy_bmi_header),
.biWidth = 1,
.biHeight = 1,
.biPlanes = 1,
.biBitCount = 32,
.biCompression = BI_RGB
};
static int once;
if (!once++)
FIXME("%p ({%lu, %lu} %d %p): stub\n", This, size.cx, size.cy, flags, phbm);
*phbm = NULL;
return E_NOTIMPL;
if (!(*phbm = CreateDIBSection(NULL, (const BITMAPINFO *)&dummy_bmi_header,
DIB_RGB_COLORS, NULL, NULL, 0)))
{
return E_OUTOFMEMORY;
}
return S_OK;
}
static const IShellItemImageFactoryVtbl ShellItem_IShellItemImageFactory_Vtbl = {
......
......@@ -4487,7 +4487,6 @@ static void test_IShellItemImageFactory(void)
ret = IShellItemImageFactory_GetImage(siif, size, SIIGBF_BIGGERSIZEOK, &hbm);
IShellItemImageFactory_Release(siif);
todo_wine
ok(ret == S_OK, "GetImage returned %lx\n", ret);
ok(FAILED(ret) == !hbm, "result = %lx but bitmap = %p\n", ret, hbm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment