Nikolay Sivov : shell32: Support IShellView in ::CreateViewObject() for printers folder.

Alexandre Julliard julliard at winehq.org
Fri Apr 16 10:56:05 CDT 2010


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Apr 16 14:35:43 2010 +0400

shell32: Support IShellView in ::CreateViewObject() for printers folder.

---

 dlls/shell32/shfldr_printers.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/shfldr_printers.c b/dlls/shell32/shfldr_printers.c
index 4c48a10..77e2439 100644
--- a/dlls/shell32/shfldr_printers.c
+++ b/dlls/shell32/shfldr_printers.c
@@ -156,8 +156,9 @@ static HRESULT WINAPI IShellFolder_Printers_fnCreateViewObject(IShellFolder2 *if
                HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
 {
     IPrintersFolderImpl *This = (IPrintersFolderImpl *)iface;
+    HRESULT hr = E_NOTIMPL;
 
-    FIXME("(%p)->(hwnd=%p,%s,%p) stub\n", This,
+    TRACE("(%p)->(hwnd=%p,%s,%p)\n", This,
           hwndOwner, shdebugstr_guid (riid), ppvOut);
 
     if (!ppvOut)
@@ -165,7 +166,19 @@ static HRESULT WINAPI IShellFolder_Printers_fnCreateViewObject(IShellFolder2 *if
 
     *ppvOut = NULL;
 
-    return E_NOTIMPL;
+    if (IsEqualIID (riid, &IID_IShellView))
+    {
+        IShellView *pShellView = IShellView_Constructor ((IShellFolder *) iface);
+        if (pShellView)
+        {
+            hr = IShellView_QueryInterface (pShellView, riid, ppvOut);
+            IShellView_Release (pShellView);
+        }
+    }
+    else
+        WARN("unsupported interface %s\n", shdebugstr_guid (riid));
+
+    return hr;
 }
 
 static HRESULT WINAPI IShellFolder_Printers_fnGetAttributesOf (IShellFolder2 * iface,




More information about the wine-cvs mailing list