Alistair Leslie-Hughes : hnetcfg: Add test for IProvideClassInfo interface.

Alexandre Julliard julliard at winehq.org
Wed Oct 17 18:15:43 CDT 2018


Module: wine
Branch: master
Commit: 13a330273421292a974b9da02b46b05bbb5adeca
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=13a330273421292a974b9da02b46b05bbb5adeca

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Oct 17 04:06:16 2018 +0000

hnetcfg: Add test for IProvideClassInfo interface.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hnetcfg/port.c         | 5 +++++
 dlls/hnetcfg/tests/policy.c | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/dlls/hnetcfg/port.c b/dlls/hnetcfg/port.c
index f497bcb..7f3f6c5 100644
--- a/dlls/hnetcfg/port.c
+++ b/dlls/hnetcfg/port.c
@@ -629,6 +629,11 @@ static HRESULT WINAPI upnpnat_QueryInterface(IUPnPNAT *iface, REFIID riid, void
     {
         *object = iface;
     }
+    else if(IsEqualGUID( riid, &IID_IProvideClassInfo))
+    {
+        TRACE("IProvideClassInfo not supported.");
+        return E_NOINTERFACE;
+    }
     else
     {
         FIXME("interface %s not implemented\n", debugstr_guid(riid));
diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c
index 61175f9..3fa8348 100644
--- a/dlls/hnetcfg/tests/policy.c
+++ b/dlls/hnetcfg/tests/policy.c
@@ -167,11 +167,15 @@ static void test_IUPnPNAT(void)
     IStaticPortMappingCollection *static_ports;
     IDynamicPortMappingCollection *dync_ports;
     INATEventManager *manager;
+    IProvideClassInfo *provider;
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUPnPNAT, (void**)&nat);
     ok(hr == S_OK, "got: %08x\n", hr);
 
+    hr = IUPnPNAT_QueryInterface(nat, &IID_IProvideClassInfo, (void**)&provider);
+    ok(hr == E_NOINTERFACE, "got: %08x\n", hr);
+
     hr = IUPnPNAT_get_StaticPortMappingCollection(nat, &static_ports);
     todo_wine ok(hr == S_OK, "got: %08x\n", hr);
     if(hr == S_OK && static_ports)




More information about the wine-cvs mailing list