Nikolay Sivov : shell32: Implement IShellImageData::GetSize().

Alexandre Julliard julliard at winehq.org
Wed Feb 8 15:52:11 CST 2017


Module: wine
Branch: master
Commit: 5222eca2d5c159ce78f686fd723cdda9a89ebbe4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5222eca2d5c159ce78f686fd723cdda9a89ebbe4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Feb  7 19:27:32 2017 +0300

shell32: Implement IShellImageData::GetSize().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/shellole.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index 46a7b03..8fb981c 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -1046,10 +1046,22 @@ static HRESULT WINAPI ShellImageDate_SelectPage(IShellImageData *iface, ULONG pa
 static HRESULT WINAPI ShellImageData_GetSize(IShellImageData *iface, SIZE *size)
 {
     ShellImageData *This = impl_from_IShellImageData(iface);
+    REAL cx, cy;
+    HRESULT hr;
 
-    FIXME("%p, %p: stub\n", This, size);
+    TRACE("%p, %p\n", This, size);
 
-    return E_NOTIMPL;
+    if (!This->image)
+        return E_FAIL;
+
+    hr = gpstatus_to_hresult(GdipGetImageDimension(This->image, &cx, &cy));
+    if (SUCCEEDED(hr))
+    {
+        size->cx = cx;
+        size->cy = cy;
+    }
+
+    return hr;
 }
 
 static HRESULT WINAPI ShellImageData_GetRawDataFormat(IShellImageData *iface, GUID *format)




More information about the wine-cvs mailing list