From: Jinoh Kang jinoh.kang.kr@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52673 --- dlls/shell32/shellitem.c | 17 +++++++++++++++-- dlls/shell32/tests/shlfolder.c | 1 - 2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 3e8bd24a429..a6d4ee9ef07 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -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 = { diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index da606a9e707..49614aed3c4 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -4456,7 +4456,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);
I am not qualified, but I express my approval for this MR.
By this MR, KakaoTalk crashing issue is finally fixed.
The bitmap thumbnail image is replaced with a preview image generated by KakaoTalk messenger server after uploading the video file. Therefore, for KakaoTalk users, detailed implementation of this function is not absolutely necessary.
I hope this journey will take one step further.