[NETSHELL]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 22:16:34 +0000 (22:16 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 22:16:34 +0000 (22:16 +0000)
- Do not display a message box in CLanStatus::QueryInterface. Fixes hang when running com_apitest:netshell
- Change the order of some interfaces in CNetworkConnections to make com_apitest slightly happier

svn path=/trunk/; revision=67314

reactos/dll/shellext/netshell/lanstatusui.cpp
reactos/dll/shellext/netshell/shfldr_netconnect.cpp

index a556334..599eb22 100644 (file)
@@ -1132,7 +1132,7 @@ CLanStatus::QueryInterface(
         AddRef();
         return S_OK;
     }
-    MessageBoxW(NULL, L"IOleCommandTarget_fnQueryInterface", NULL, MB_OK);
+
     return E_NOINTERFACE;
 }
 
index 4710fb5..dce3afa 100644 (file)
@@ -27,8 +27,8 @@
 */
 
 class CNetworkConnections final :
-    public IShellFolder2,
     public IPersistFolder2,
+    public IShellFolder2,
     public IShellExecuteHookW
 {
     public:
@@ -170,26 +170,22 @@ HRESULT WINAPI CNetworkConnections::QueryInterface(REFIID riid, LPVOID *ppvObj)
     *ppvObj = NULL;
 
     if (IsEqualIID(riid, IID_IUnknown) ||
-        IsEqualIID(riid, IID_IShellFolder) ||
-        IsEqualIID(riid, IID_IShellFolder2))
+        IsEqualIID (riid, IID_IPersist) ||
+        IsEqualIID (riid, IID_IPersistFolder) ||
+        IsEqualIID (riid, IID_IPersistFolder2))
     {
-        *ppvObj = static_cast<IShellFolder2*>(this);
+        *ppvObj = static_cast<IPersistFolder2*>(this);
     }
-    else if (IsEqualIID (riid, IID_IPersistFolder) ||
-             IsEqualIID (riid, IID_IPersistFolder2))
+    else if (IsEqualIID(riid, IID_IShellFolder) ||
+             IsEqualIID(riid, IID_IShellFolder2))
     {
-        *ppvObj = static_cast<IPersistFolder2*>(this);
+        *ppvObj = static_cast<IShellFolder2*>(this);
     }
     else if (IsEqualIID(riid, IID_IShellExecuteHookW))
     {
         *ppvObj = static_cast<IShellExecuteHookW*>(this);
     }
-#if 0
-    else if (IsEqualIID(riid, IID_IPersistIDList))
-    {
-        //*ppvObj = static_cast<IPersistIDList*>(this);
-    }
-#endif
+
     if (*ppvObj)
     {
         AddRef();
@@ -197,11 +193,9 @@ HRESULT WINAPI CNetworkConnections::QueryInterface(REFIID riid, LPVOID *ppvObj)
     }
 
     /* TODO:
-     * IID_IPersistFreeThreadedObject
-     * IID_IBrowserFrameOptions
-     * IID_IShellIconOverlay
-     * IID_IPersistIDList
-     * IID_IPersist
+     * IID_IShellExtInit
+     * IID_IOleCommandTarget
+     * IID_IShellFolderViewCB
      */
 
     return E_NOINTERFACE;