[NETSHELL][COM_APITEST]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 22:50:25 +0000 (22:50 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 22:50:25 +0000 (22:50 +0000)
- Remove another MessageBox...
- Also test some more interfaces found in netshell classes

svn path=/trunk/; revision=67316

reactos/dll/shellext/netshell/lanconnectui.cpp
reactos/dll/shellext/netshell/shfldr_netconnect.cpp
rostests/apitests/com/CMakeLists.txt
rostests/apitests/com/com_apitest.c
rostests/apitests/com/com_apitest.h
rostests/apitests/com/netcfgx.c [new file with mode: 0644]
rostests/apitests/com/netshell.c
rostests/apitests/com/shdocvw.c
rostests/apitests/com/testlist.c

index 8a36511..2d9b073 100644 (file)
@@ -25,9 +25,9 @@ typedef struct
 } NET_ITEM, *PNET_ITEM;
 
 class CNetConnectionPropertyUi final :
+    public INetConnectionConnectUi,
     public INetConnectionPropertyUi2,
-    public INetLanConnectionUiInfo,
-    public INetConnectionConnectUi
+    public INetLanConnectionUiInfo
 {
     public:
         CNetConnectionPropertyUi();
@@ -522,7 +522,6 @@ CNetConnectionPropertyUi::QueryInterface(
     REFIID iid,
     LPVOID *ppvObj)
 {
-    LPOLESTR pStr;
     *ppvObj = NULL;
 
     if (IsEqualIID (iid, IID_IUnknown) ||
@@ -546,9 +545,6 @@ CNetConnectionPropertyUi::QueryInterface(
         return S_OK;
     }
 
-    StringFromCLSID((CLSID)iid, &pStr);
-    MessageBoxW(NULL, pStr, L"INetConnectionPropertyUi_fnQueryInterface", MB_OK);
-    CoTaskMemFree(pStr);
     return E_NOINTERFACE;
 }
 
index dce3afa..c828f87 100644 (file)
@@ -706,9 +706,6 @@ HRESULT WINAPI CNetConUiObject::QueryInterface(REFIID iid, LPVOID *ppvObject)
         return S_OK;
     }
 
-    //LPOLESTR pStr;
-    //StringFromCLSID(iid, &pStr);
-    //MessageBoxW(NULL, L"ISF_NetConnect_IContextMenu2_QueryInterface unhandled", pStr, MB_OK);
     return E_NOINTERFACE;
 }
 
index 813a421..1a29e20 100644 (file)
@@ -4,6 +4,7 @@ add_definitions(-DWINE_NO_UNICODE_MACROS)
 list(APPEND SOURCE
     browseui.c
     ieframe.c
+    netcfgx.c
     netshell.c
     shdocvw.c
     shell32.c
index 9dec3df..9f8c3b0 100644 (file)
@@ -110,6 +110,9 @@ static KNOWN_INTERFACE KnownInterfaces[] =
     { ID_NAME(IID_IEnumExtraSearch)                  },
     { ID_NAME(IID_IEnumGUID)                         },
     { ID_NAME(IID_IEnumIDList)                       },
+    //{ ID_NAME(IID_IEnumNetCfgBindingInterface)       },
+    //{ ID_NAME(IID_IEnumNetCfgBindingPath)            },
+    { ID_NAME(IID_IEnumNetCfgComponent),        TRUE },
     { ID_NAME(IID_IEnumNetConnection)                },
     { ID_NAME(IID_IEnumShellItems)                   },
     { ID_NAME(IID_IEnumString)                       },
@@ -155,10 +158,20 @@ static KNOWN_INTERFACE KnownInterfaces[] =
     { ID_NAME(IID_IMultiQI),                    TRUE },
     { ID_NAME(IID_INamespaceProxy),             TRUE },
     { ID_NAME(IID_INameSpaceTreeControl),       TRUE },
+    { ID_NAME(IID_INetCfg),                     TRUE },
+    //{ ID_NAME(IID_INetCfgBindingInterface)           },
+    //{ ID_NAME(IID_INetCfgBindingPath)                },
+    { ID_NAME(IID_INetCfgComponent),            TRUE },
+    { ID_NAME(IID_INetCfgComponentBindings),    TRUE },
+    { ID_NAME(IID_INetCfgComponentControl),     TRUE },
+    { ID_NAME(IID_INetCfgComponentPropertyUi),  TRUE },
+    { ID_NAME(IID_INetCfgLock),                 TRUE },
+    { ID_NAME(IID_INetCfgPnpReconfigCallback),  TRUE },
     { ID_NAME(IID_INetConnectionConnectUi),     TRUE },
     { ID_NAME(IID_INetConnectionPropertyUi),    TRUE },
     { ID_NAME(IID_INetConnectionPropertyUi2),   TRUE },
     { ID_NAME(IID_INetConnectionManager)             },
+    { ID_NAME(IID_INetLanConnectionUiInfo),     TRUE },
     { ID_NAME(IID_INewShortcutHookA),           TRUE },
     { ID_NAME(IID_INewShortcutHookW),           TRUE },
     { ID_NAME(IID_INSCTree),                    TRUE },
index 172edd6..be1df50 100644 (file)
@@ -24,6 +24,8 @@
 #include <oleacc.h>
 #include <oaidl.h>
 #include <netcon.h>
+#include <netcfgx.h>
+#include <netcfgn.h>
 #include <mshtmhst.h>
 #include <perhist.h>
 #include <shlguid.h>
diff --git a/rostests/apitests/com/netcfgx.c b/rostests/apitests/com/netcfgx.c
new file mode 100644 (file)
index 0000000..ef13b7d
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * PROJECT:         ReactOS api tests
+ * LICENSE:         LGPLv2.1+ - See COPYING.LIB in the top level directory
+ * PURPOSE:         COM interface test for netcfgx classes
+ * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
+ */
+
+#include "com_apitest.h"
+
+#define NDEBUG
+#include <debug.h>
+
+static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
+{
+    {
+        ID_NAME(CLSID_CNetCfg),
+        {
+            {    0x0,   &IID_INetCfg },
+            {    0x0,       &IID_IUnknown },
+            {    0x4,   &IID_INetCfgLock },
+            {   0x10,   &IID_INetCfgPnpReconfigCallback },
+        },
+        L"Both"
+    },
+};
+static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
+
+START_TEST(netcfgx)
+{
+    TestClasses(L"netcfgx", ExpectedInterfaces, ExpectedInterfaceCount);
+}
index 6169416..2562d5e 100644 (file)
@@ -103,6 +103,7 @@ static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
             {    0x0,       &IID_IUnknown },
             {    0x4,   &IID_INetConnectionPropertyUi2 },
             {    0x4,       &IID_INetConnectionPropertyUi },
+            {   0x10,   &IID_INetLanConnectionUiInfo },
         },
         L"Both"
     },
index dfcdbca..4ddd95a 100644 (file)
 
 static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
 {
+    {
+        ID_NAME(CLSID_AdminFolderShortcut),
+        {
+            {    0x0,   &IID_IShellFolder2 },
+            {    0x0,       &IID_IShellFolder },
+            {    0x0,           &IID_IUnknown },
+            {    0x4,   &IID_IPersistFolder3 },
+            {    0x4,       &IID_IPersistFolder2 },
+            {    0x4,           &IID_IPersistFolder },
+            {    0x4,               &IID_IPersist },
+            {    0x8,   &IID_IShellLinkA },
+            {    0xc,   &IID_IShellLinkW },
+            {   0x10,   &IID_IPersistFile },
+            {   0x14,   &IID_IExtractIconW },
+            {   0x18,   &IID_IQueryInfo },
+            {   0x20,   &IID_IPersistStream },
+            {   0x20,   &IID_IPersistStreamInit },
+            {   0x24,   &IID_IPersistPropertyBag },
+            {   0x28,   &IID_IBrowserFrameOptions },
+        }
+    },
     {
         ID_NAME(CLSID_ExplorerBand),
         {
index 9f8df8d..71639d9 100644 (file)
@@ -6,6 +6,7 @@
 extern void func_browseui(void);
 extern void func_ieframe(void);
 extern void func_interfaces(void);
+extern void func_netcfgx(void);
 extern void func_netshell(void);
 extern void func_shdocvw(void);
 extern void func_shell32(void);
@@ -15,6 +16,7 @@ const struct test winetest_testlist[] =
     { "browseui", func_browseui },
     { "ieframe", func_ieframe },
     { "interfaces", func_interfaces },
+    { "netcfgx", func_netcfgx },
     { "netshell", func_netshell },
     { "shdocvw", func_shdocvw },
     { "shell32", func_shell32 },