https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c98f2203d6ede6c1d1cc81c5e01cae7cbc525e9

commit 7c98f2203d6ede6c1d1cc81c5e01cae7cbc525e9
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sun Oct 20 20:03:33 2019 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sun Oct 20 20:03:33 2019 +0100

    [HNETCFG] Sync with Wine Staging 4.18. CORE-16441
---
 dll/win32/hnetcfg/CMakeLists.txt    |   2 +-
 dll/win32/hnetcfg/apps.c            |  60 +++++++++++--
 dll/win32/hnetcfg/hnetcfg.c         |   7 ++
 dll/win32/hnetcfg/hnetcfg.idl       |  24 +++++
 dll/win32/hnetcfg/hnetcfg.rgs       |  27 ++++++
 dll/win32/hnetcfg/hnetcfg_private.h |   2 +
 dll/win32/hnetcfg/hnetcfg_tlb.idl   |   1 +
 dll/win32/hnetcfg/hnetcfg_tlb.rgs   |  25 +++++-
 dll/win32/hnetcfg/manager.c         |   3 -
 dll/win32/hnetcfg/policy.c          |  13 ++-
 dll/win32/hnetcfg/port.c            | 174 +++++++++++++++++++++++++++++++++++-
 dll/win32/hnetcfg/profile.c         |   2 -
 dll/win32/hnetcfg/service.c         |   2 -
 media/doc/README.WINE               |   2 +-
 14 files changed, 313 insertions(+), 31 deletions(-)

diff --git a/dll/win32/hnetcfg/CMakeLists.txt b/dll/win32/hnetcfg/CMakeLists.txt
index 4e75ba685e0..14353e9f4ad 100644
--- a/dll/win32/hnetcfg/CMakeLists.txt
+++ b/dll/win32/hnetcfg/CMakeLists.txt
@@ -29,6 +29,6 @@ set_source_files_properties(hnetcfg.rc PROPERTIES 
OBJECT_DEPENDS "${hnetcfg_rc_d
 set_module_type(hnetcfg win32dll)
 add_dependencies(hnetcfg stdole2)
 target_link_libraries(hnetcfg wine uuid)
-add_importlibs(hnetcfg ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(hnetcfg ole32 oleaut32 advapi32 mpr msvcrt kernel32 ntdll)
 add_pch(hnetcfg precomp.h SOURCE)
 add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/hnetcfg/apps.c b/dll/win32/hnetcfg/apps.c
index fda714e3bb8..e0f2cc3b629 100644
--- a/dll/win32/hnetcfg/apps.c
+++ b/dll/win32/hnetcfg/apps.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -27,9 +26,13 @@
 #include "winuser.h"
 #include "ole2.h"
 #include "netfw.h"
+#include "natupnp.h"
+#ifdef __REACTOS__
+#include "winnetwk.h"
+#endif
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
+#include "wine/heap.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
@@ -114,7 +117,8 @@ static REFIID tid_id[] =
     &IID_INetFwOpenPorts,
     &IID_INetFwPolicy,
     &IID_INetFwPolicy2,
-    &IID_INetFwProfile
+    &IID_INetFwProfile,
+    &IID_IUPnPNAT
 };
 
 HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
@@ -156,7 +160,7 @@ void release_typelib(void)
 {
     unsigned i;
 
-    for (i = 0; i < sizeof(typeinfo)/sizeof(*typeinfo); i++)
+    for (i = 0; i < ARRAY_SIZE(typeinfo); i++)
         if (typeinfo[i])
             ITypeInfo_Release(typeinfo[i]);
 
@@ -263,18 +267,56 @@ static HRESULT WINAPI fw_app_get_ProcessImageFileName(
 }
 
 static HRESULT WINAPI fw_app_put_ProcessImageFileName(
-    INetFwAuthorizedApplication *iface,
-    BSTR imageFileName )
+    INetFwAuthorizedApplication *iface, BSTR image )
 {
     fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
+    UNIVERSAL_NAME_INFOW *info;
+    DWORD sz, longsz;
+    WCHAR *path;
+    DWORD res;
 
-    FIXME("%p, %s\n", This, debugstr_w(imageFileName));
+    FIXME("%p, %s\n", This, debugstr_w(image));
 
-    if (!imageFileName || !imageFileName[0])
+    if (!image || !image[0])
         return E_INVALIDARG;
 
+    sz = 0;
+    res = WNetGetUniversalNameW(image, UNIVERSAL_NAME_INFO_LEVEL, NULL, &sz);
+    if (res == WN_MORE_DATA)
+    {
+        if (!(path = heap_alloc(sz)))
+            return E_OUTOFMEMORY;
+
+        info = (UNIVERSAL_NAME_INFOW *)&path;
+        res = WNetGetUniversalNameW(image, UNIVERSAL_NAME_INFO_LEVEL, &info, 
&sz);
+        if (res == NO_ERROR)
+        {
+            SysFreeString(This->filename);
+            This->filename = SysAllocString(info->lpUniversalName);
+        }
+        heap_free(path);
+        return HRESULT_FROM_WIN32(res);
+    }
+
+    sz = GetFullPathNameW(image, 0, NULL, NULL);
+    if (!(path = heap_alloc(++sz * sizeof(WCHAR))))
+        return E_OUTOFMEMORY;
+    GetFullPathNameW(image, sz, path, NULL);
+
+    longsz = GetLongPathNameW(path, path, sz);
+    if (longsz > sz)
+    {
+        if (!(path = heap_realloc(path, longsz * sizeof(WCHAR))))
+        {
+            heap_free(path);
+            return E_OUTOFMEMORY;
+        }
+        GetLongPathNameW(path, path, longsz);
+    }
+
     SysFreeString( This->filename );
-    This->filename = SysAllocString( imageFileName );
+    This->filename = SysAllocString(path);
+    heap_free(path);
     return This->filename ? S_OK : E_OUTOFMEMORY;
 }
 
diff --git a/dll/win32/hnetcfg/hnetcfg.c b/dll/win32/hnetcfg/hnetcfg.c
index e56dbab9e74..5cc24a1447b 100644
--- a/dll/win32/hnetcfg/hnetcfg.c
+++ b/dll/win32/hnetcfg/hnetcfg.c
@@ -25,6 +25,7 @@
 #include "objbase.h"
 #include "rpcproxy.h"
 #include "netfw.h"
+#include "natupnp.h"
 
 #include "wine/debug.h"
 #include "hnetcfg_private.h"
@@ -114,6 +115,8 @@ static hnetcfg_cf fw_manager_cf = { { &hnetcfg_cf_vtbl }, 
NetFwMgr_create };
 static hnetcfg_cf fw_app_cf = { { &hnetcfg_cf_vtbl }, 
NetFwAuthorizedApplication_create };
 static hnetcfg_cf fw_openport_cf = { { &hnetcfg_cf_vtbl }, 
NetFwOpenPort_create };
 static hnetcfg_cf fw_policy2_cf = { { &hnetcfg_cf_vtbl }, NetFwPolicy2_create 
};
+static hnetcfg_cf upnpnat_cf = { { &hnetcfg_cf_vtbl }, IUPnPNAT_create };
+
 
 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved)
 {
@@ -156,6 +159,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID 
iid, LPVOID *ppv )
     {
        cf = &fw_policy2_cf.IClassFactory_iface;
     }
+    else if (IsEqualGUID( rclsid, &CLSID_UPnPNAT ))
+    {
+        cf = &upnpnat_cf.IClassFactory_iface;
+    }
 
     if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
     return IClassFactory_QueryInterface( cf, iid, ppv );
diff --git a/dll/win32/hnetcfg/hnetcfg.idl b/dll/win32/hnetcfg/hnetcfg.idl
index 763529a83b9..40a3b9853f7 100644
--- a/dll/win32/hnetcfg/hnetcfg.idl
+++ b/dll/win32/hnetcfg/hnetcfg.idl
@@ -51,3 +51,27 @@ coclass NetFwOpenPort { interface INetFwOpenPort; }
     uuid(e2b3c97f-6ae1-41ac-817a-f6f92166d7dd)
 ]
 coclass NetFwPolicy2 { interface INetFwPolicy2; }
+
+[
+    helpstring("HNetCfg.FwRule"),
+    progid("HNetCfg.FwRule"),
+    threading(both),
+    uuid(2c5bc43e-3369-4c33-ab0c-be9469677af4)
+]
+coclass NetFwRule { interface INetFwRule; }
+
+[
+    helpstring("HNetCfg.FwProduct"),
+    progid("HNetCfg.FwProduct"),
+    threading(both),
+    uuid(9d745ed8-c514-4d1d-bf42-751fed2d5ac7)
+]
+coclass NetFwProduct { interface INetFwProduct; }
+
+[
+    helpstring("HNetCfg.FwProducts"),
+    progid("HNetCfg.FwProducts"),
+    threading(both),
+    uuid(cc19079b-8272-4d73-bb70-cdb533527b61)
+]
+coclass NetFwProducts { interface INetFwProducts; }
diff --git a/dll/win32/hnetcfg/hnetcfg.rgs b/dll/win32/hnetcfg/hnetcfg.rgs
index eb7f5266fca..4974ebef711 100644
--- a/dll/win32/hnetcfg/hnetcfg.rgs
+++ b/dll/win32/hnetcfg/hnetcfg.rgs
@@ -25,6 +25,21 @@ HKCR
             InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
             ProgId = s 'HNetCfg.FwPolicy2'
         }
+        '{2C5BC43E-3369-4C33-AB0C-BE9469677AF4}' = s 'HNetCfg.FwRule'
+        {
+            InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
+            ProgId = s 'HNetCfg.FwRule'
+        }
+        '{9D745ED8-C514-4D1D-BF42-751FED2D5AC7}' = s 'HNetCfg.FwProduct'
+        {
+            InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
+            ProgId = s 'HNetCfg.FwProduct'
+        }
+        '{CC19079B-8272-4D73-BB70-CDB533527B61}' = s 'HNetCfg.FwProducts'
+        {
+            InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
+            ProgId = s 'HNetCfg.FwProducts'
+        }
     }
     'HNetCfg.FwMgr' = s 'HNetCfg.FwMgr'
     {
@@ -42,4 +57,16 @@ HKCR
     {
         CLSID = s '{E2B3C97F-6AE1-41AC-817A-F6F92166D7DD}'
     }
+    'HNetCfg.FwRule' = s 'HNetCfg.FwRule'
+    {
+        CLSID = s '{2C5BC43E-3369-4C33-AB0C-BE9469677AF4}'
+    }
+    'HNetCfg.FwProduct' = s 'HNetCfg.FwProduct'
+    {
+        CLSID = s '{9D745ED8-C514-4D1D-BF42-751FED2D5AC7}'
+    }
+    'HNetCfg.FwProducts' = s 'HNetCfg.FwProducts'
+    {
+        CLSID = s '{CC19079B-8272-4D73-BB70-CDB533527B61}'
+    }
 }
diff --git a/dll/win32/hnetcfg/hnetcfg_private.h 
b/dll/win32/hnetcfg/hnetcfg_private.h
index 26b52d9231b..0e67d81cd60 100644
--- a/dll/win32/hnetcfg/hnetcfg_private.h
+++ b/dll/win32/hnetcfg/hnetcfg_private.h
@@ -29,6 +29,7 @@ enum type_id
     INetFwPolicy2_tid,
     INetFwProfile_tid,
     INetFwRules_tid,
+    IUPnPNAT_tid,
     last_tid
 };
 
@@ -44,3 +45,4 @@ HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID 
*) DECLSPEC_HIDDEN
 HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
 HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
 HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
+HRESULT IUPnPNAT_create(IUnknown *, void **) DECLSPEC_HIDDEN;
diff --git a/dll/win32/hnetcfg/hnetcfg_tlb.idl 
b/dll/win32/hnetcfg/hnetcfg_tlb.idl
index 33e8cc87ae0..e368fe60c38 100644
--- a/dll/win32/hnetcfg/hnetcfg_tlb.idl
+++ b/dll/win32/hnetcfg/hnetcfg_tlb.idl
@@ -21,3 +21,4 @@
 #pragma makedep regtypelib
 
 #include "netfw.idl"
+#include "natupnp.idl"
diff --git a/dll/win32/hnetcfg/hnetcfg_tlb.rgs 
b/dll/win32/hnetcfg/hnetcfg_tlb.rgs
index 50ff31f0777..1628f02b90b 100644
--- a/dll/win32/hnetcfg/hnetcfg_tlb.rgs
+++ b/dll/win32/hnetcfg/hnetcfg_tlb.rgs
@@ -2,11 +2,11 @@ HKCR
 {
     NoRemove Typelib
     {
-        NoRemove '{DB4F3345-3EF8-45ED-B976-25A6D3B81B71}'
+        NoRemove '{1C565858-F302-471E-B409-F180AA4ABEC6}'
         {
-            '1.0' = s 'NetFwPublicTypeLib'
+            '1.0' = s 'NATUPNPLib'
             {
-                '0' { win32 = s '%MODULE%' }
+                '0' { win32 = s '%MODULE%\2' }
                 FLAGS = s '0'
             }
         }
@@ -16,5 +16,22 @@ HKCR
     }
     NoRemove CLSID
     {
+        '{AE1E00AA-3FD5-403C-8A27-2BBDC30CD0E1}' = s 'UPnPNAT'
+        {
+            InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' 
}
+            ProgId = s 'HNetCfg.NATUPnP.1'
+            TypeLib = s '{1C565858-F302-471E-B409-F180AA4ABEC6}'
+            Version = s '1.0'
+            VersionIndependentProgId = s 'HNetCfg.NATUPnP'
+        }
+    }
+    'HNetCfg.NATUPnP.1' = s 'UPnPNAT'
+    {
+        CLSID = s '{AE1E00AA-3FD5-403C-8A27-2BBDC30CD0E1}'
+    }
+    'HNetCfg.NATUPnP' = s 'UPnPNAT'
+    {
+        CLSID = s '{AE1E00AA-3FD5-403C-8A27-2BBDC30CD0E1}'
+        CurVer = s 'HNetCfg.NATUPnP.1'
     }
-}
+}
\ No newline at end of file
diff --git a/dll/win32/hnetcfg/manager.c b/dll/win32/hnetcfg/manager.c
index 1d548b41a94..2c0790a73b5 100644
--- a/dll/win32/hnetcfg/manager.c
+++ b/dll/win32/hnetcfg/manager.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -25,12 +24,10 @@
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
-#include "initguid.h"
 #include "ole2.h"
 #include "netfw.h"
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
diff --git a/dll/win32/hnetcfg/policy.c b/dll/win32/hnetcfg/policy.c
index c2f32520bd4..1f5b0daa568 100644
--- a/dll/win32/hnetcfg/policy.c
+++ b/dll/win32/hnetcfg/policy.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -29,7 +28,6 @@
 #include "netfw.h"
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
@@ -238,6 +236,10 @@ static HRESULT WINAPI netfw_rules_get__NewEnum(
     fw_rules *This = impl_from_INetFwRules( iface );
 
     FIXME("%p, %p\n", This, newEnum);
+
+    if (!newEnum) return E_POINTER;
+    *newEnum = NULL;
+
     return E_NOTIMPL;
 }
 
@@ -641,11 +643,8 @@ static HRESULT WINAPI fwpolicy2_get_Rules(INetFwPolicy2 
*iface, INetFwRules **ru
     if(!rules)
         return E_POINTER;
 
-    if(rules)
-    {
-        *rules = This->fw_policy2_rules;
-        INetFwRules_AddRef(This->fw_policy2_rules);
-    }
+    *rules = This->fw_policy2_rules;
+    INetFwRules_AddRef(This->fw_policy2_rules);
 
     return S_OK;
 }
diff --git a/dll/win32/hnetcfg/port.c b/dll/win32/hnetcfg/port.c
index 7d749650763..bb33d6a2bf4 100644
--- a/dll/win32/hnetcfg/port.c
+++ b/dll/win32/hnetcfg/port.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -27,9 +26,10 @@
 #include "winuser.h"
 #include "ole2.h"
 #include "netfw.h"
+#include "natupnp.h"
 
+#include "wine/heap.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
@@ -603,3 +603,173 @@ HRESULT NetFwOpenPorts_create( IUnknown *pUnkOuter, 
LPVOID *ppObj )
     TRACE("returning iface %p\n", *ppObj);
     return S_OK;
 }
+
+typedef struct _upnpnat
+{
+    IUPnPNAT IUPnPNAT_iface;
+    LONG ref;
+} upnpnat;
+
+static inline upnpnat *impl_from_IUPnPNAT( IUPnPNAT *iface )
+{
+    return CONTAINING_RECORD(iface, upnpnat, IUPnPNAT_iface);
+}
+
+static HRESULT WINAPI upnpnat_QueryInterface(IUPnPNAT *iface, REFIID riid, 
void **object)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+
+    TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
+
+    if ( IsEqualGUID( riid, &IID_IUPnPNAT ) ||
+         IsEqualGUID( riid, &IID_IDispatch ) ||
+         IsEqualGUID( riid, &IID_IUnknown ) )
+    {
+        *object = iface;
+    }
+    else if(IsEqualGUID( riid, &IID_IProvideClassInfo))
+    {
+        TRACE("IProvideClassInfo not supported.\n");
+        return E_NOINTERFACE;
+    }
+    else
+    {
+        FIXME("interface %s not implemented\n", debugstr_guid(riid));
+        return E_NOINTERFACE;
+    }
+    IUPnPNAT_AddRef( iface );
+    return S_OK;
+}
+
+static ULONG WINAPI upnpnat_AddRef(IUPnPNAT *iface)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    return InterlockedIncrement( &This->ref );
+}
+
+static ULONG WINAPI upnpnat_Release(IUPnPNAT *iface)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    LONG refs = InterlockedDecrement( &This->ref );
+    if (!refs)
+    {
+        heap_free( This );
+    }
+    return refs;
+}
+
+static HRESULT WINAPI upnpnat_GetTypeInfoCount(IUPnPNAT *iface, UINT *pctinfo)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+
+    TRACE("%p %p\n", This, pctinfo);
+    *pctinfo = 1;
+    return S_OK;
+}
+
+static HRESULT WINAPI upnpnat_GetTypeInfo(IUPnPNAT *iface, UINT iTInfo, LCID 
lcid, ITypeInfo **ppTInfo)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+
+    TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
+    return get_typeinfo( IUPnPNAT_tid, ppTInfo );
+}
+
+static HRESULT WINAPI upnpnat_GetIDsOfNames(IUPnPNAT *iface, REFIID riid, 
LPOLESTR *rgszNames,
+                UINT cNames, LCID lcid, DISPID *rgDispId)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    ITypeInfo *typeinfo;
+    HRESULT hr;
+
+    TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, 
lcid, rgDispId);
+
+    hr = get_typeinfo( IUPnPNAT_tid, &typeinfo );
+    if (SUCCEEDED(hr))
+    {
+        hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
+        ITypeInfo_Release( typeinfo );
+    }
+    return hr;
+}
+
+static HRESULT WINAPI upnpnat_Invoke(IUPnPNAT *iface, DISPID dispIdMember, 
REFIID riid, LCID lcid,
+                WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, 
EXCEPINFO *pExcepInfo,
+                UINT *puArgErr)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    ITypeInfo *typeinfo;
+    HRESULT hr;
+
+    TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, 
debugstr_guid(riid),
+          lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+
+    hr = get_typeinfo( IUPnPNAT_tid, &typeinfo );
+    if (SUCCEEDED(hr))
+    {
+        hr = ITypeInfo_Invoke( typeinfo, &This->IUPnPNAT_iface, dispIdMember,
+                               wFlags, pDispParams, pVarResult, pExcepInfo, 
puArgErr );
+        ITypeInfo_Release( typeinfo );
+    }
+    return hr;
+}
+
+static HRESULT WINAPI upnpnat_get_StaticPortMappingCollection(IUPnPNAT *iface, 
IStaticPortMappingCollection **collection)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    FIXME("%p, %p\n", This, collection);
+    if(collection)
+        *collection = NULL;
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI upnpnat_get_DynamicPortMappingCollection(IUPnPNAT 
*iface, IDynamicPortMappingCollection **collection)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    FIXME("%p, %p\n", This, collection);
+    if(collection)
+        *collection = NULL;
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI upnpnat_get_NATEventManager(IUPnPNAT *iface, 
INATEventManager **manager)
+{
+    upnpnat *This = impl_from_IUPnPNAT( iface );
+    FIXME("%p, %p\n", This, manager);
+    if(manager)
+        *manager = NULL;
+    return E_NOTIMPL;
+}
+
+static const IUPnPNATVtbl upnpnat_vtbl =
+{
+    upnpnat_QueryInterface,
+    upnpnat_AddRef,
+    upnpnat_Release,
+    upnpnat_GetTypeInfoCount,
+    upnpnat_GetTypeInfo,
+    upnpnat_GetIDsOfNames,
+    upnpnat_Invoke,
+    upnpnat_get_StaticPortMappingCollection,
+    upnpnat_get_DynamicPortMappingCollection,
+    upnpnat_get_NATEventManager
+};
+
+
+HRESULT IUPnPNAT_create(IUnknown *outer, void **object)
+{
+    upnpnat *nat;
+
+    TRACE("(%p,%p)\n", outer, object);
+
+    nat = heap_alloc( sizeof(*nat) );
+    if (!nat) return E_OUTOFMEMORY;
+
+    nat->IUPnPNAT_iface.lpVtbl = &upnpnat_vtbl;
+    nat->ref = 1;
+
+    *object = &nat->IUPnPNAT_iface;
+
+    TRACE("returning iface %p\n", *object);
+    return S_OK;
+}
diff --git a/dll/win32/hnetcfg/profile.c b/dll/win32/hnetcfg/profile.c
index 835e82ed14b..d0e9f48dab4 100644
--- a/dll/win32/hnetcfg/profile.c
+++ b/dll/win32/hnetcfg/profile.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -29,7 +28,6 @@
 #include "netfw.h"
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
diff --git a/dll/win32/hnetcfg/service.c b/dll/win32/hnetcfg/service.c
index fa214b67601..5bfeedaaedf 100644
--- a/dll/win32/hnetcfg/service.c
+++ b/dll/win32/hnetcfg/service.c
@@ -16,7 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -29,7 +28,6 @@
 #include "netfw.h"
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "hnetcfg_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index a94f3ca32fa..3d051727089 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -72,7 +72,7 @@ dll/win32/fusion              # Synced to WineStaging-3.17
 dll/win32/gdiplus             # Synced to WineStaging-4.0
 dll/win32/hhctrl.ocx          # Synced to WineStaging-4.0
 dll/win32/hlink               # Synced to WineStaging-4.0
-dll/win32/hnetcfg             # Synced to WineStaging-3.9
+dll/win32/hnetcfg             # Synced to WineStaging-4.18
 dll/win32/httpapi             # Synced to WineStaging-3.3
 dll/win32/iccvid              # Synced to WineStaging-4.0
 dll/win32/ieframe             # Synced to WineStaging-4.0

Reply via email to