mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:52:56 +00:00
[HNETCFG] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
c73a46af9c
commit
7c98f2203d
14 changed files with 313 additions and 31 deletions
|
@ -29,6 +29,6 @@ set_source_files_properties(hnetcfg.rc PROPERTIES OBJECT_DEPENDS "${hnetcfg_rc_d
|
||||||
set_module_type(hnetcfg win32dll)
|
set_module_type(hnetcfg win32dll)
|
||||||
add_dependencies(hnetcfg stdole2)
|
add_dependencies(hnetcfg stdole2)
|
||||||
target_link_libraries(hnetcfg wine uuid)
|
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_pch(hnetcfg precomp.h SOURCE)
|
||||||
add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -27,9 +26,13 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
#include "natupnp.h"
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
#include "winnetwk.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/heap.h"
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
@ -114,7 +117,8 @@ static REFIID tid_id[] =
|
||||||
&IID_INetFwOpenPorts,
|
&IID_INetFwOpenPorts,
|
||||||
&IID_INetFwPolicy,
|
&IID_INetFwPolicy,
|
||||||
&IID_INetFwPolicy2,
|
&IID_INetFwPolicy2,
|
||||||
&IID_INetFwProfile
|
&IID_INetFwProfile,
|
||||||
|
&IID_IUPnPNAT
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
|
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
|
||||||
|
@ -156,7 +160,7 @@ void release_typelib(void)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(typeinfo)/sizeof(*typeinfo); i++)
|
for (i = 0; i < ARRAY_SIZE(typeinfo); i++)
|
||||||
if (typeinfo[i])
|
if (typeinfo[i])
|
||||||
ITypeInfo_Release(typeinfo[i]);
|
ITypeInfo_Release(typeinfo[i]);
|
||||||
|
|
||||||
|
@ -263,18 +267,56 @@ static HRESULT WINAPI fw_app_get_ProcessImageFileName(
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI fw_app_put_ProcessImageFileName(
|
static HRESULT WINAPI fw_app_put_ProcessImageFileName(
|
||||||
INetFwAuthorizedApplication *iface,
|
INetFwAuthorizedApplication *iface, BSTR image )
|
||||||
BSTR imageFileName )
|
|
||||||
{
|
{
|
||||||
fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
|
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;
|
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 );
|
SysFreeString( This->filename );
|
||||||
This->filename = SysAllocString( imageFileName );
|
This->filename = SysAllocString(path);
|
||||||
|
heap_free(path);
|
||||||
return This->filename ? S_OK : E_OUTOFMEMORY;
|
return This->filename ? S_OK : E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "rpcproxy.h"
|
#include "rpcproxy.h"
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
#include "natupnp.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "hnetcfg_private.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_app_cf = { { &hnetcfg_cf_vtbl }, NetFwAuthorizedApplication_create };
|
||||||
static hnetcfg_cf fw_openport_cf = { { &hnetcfg_cf_vtbl }, NetFwOpenPort_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 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)
|
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;
|
cf = &fw_policy2_cf.IClassFactory_iface;
|
||||||
}
|
}
|
||||||
|
else if (IsEqualGUID( rclsid, &CLSID_UPnPNAT ))
|
||||||
|
{
|
||||||
|
cf = &upnpnat_cf.IClassFactory_iface;
|
||||||
|
}
|
||||||
|
|
||||||
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
|
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
|
||||||
return IClassFactory_QueryInterface( cf, iid, ppv );
|
return IClassFactory_QueryInterface( cf, iid, ppv );
|
||||||
|
|
|
@ -51,3 +51,27 @@ coclass NetFwOpenPort { interface INetFwOpenPort; }
|
||||||
uuid(e2b3c97f-6ae1-41ac-817a-f6f92166d7dd)
|
uuid(e2b3c97f-6ae1-41ac-817a-f6f92166d7dd)
|
||||||
]
|
]
|
||||||
coclass NetFwPolicy2 { interface INetFwPolicy2; }
|
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; }
|
||||||
|
|
|
@ -25,6 +25,21 @@ HKCR
|
||||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||||
ProgId = s 'HNetCfg.FwPolicy2'
|
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'
|
'HNetCfg.FwMgr' = s 'HNetCfg.FwMgr'
|
||||||
{
|
{
|
||||||
|
@ -42,4 +57,16 @@ HKCR
|
||||||
{
|
{
|
||||||
CLSID = s '{E2B3C97F-6AE1-41AC-817A-F6F92166D7DD}'
|
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}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ enum type_id
|
||||||
INetFwPolicy2_tid,
|
INetFwPolicy2_tid,
|
||||||
INetFwProfile_tid,
|
INetFwProfile_tid,
|
||||||
INetFwRules_tid,
|
INetFwRules_tid,
|
||||||
|
IUPnPNAT_tid,
|
||||||
last_tid
|
last_tid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,3 +45,4 @@ HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
|
||||||
HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||||
HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||||
HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||||
|
HRESULT IUPnPNAT_create(IUnknown *, void **) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -21,3 +21,4 @@
|
||||||
#pragma makedep regtypelib
|
#pragma makedep regtypelib
|
||||||
|
|
||||||
#include "netfw.idl"
|
#include "netfw.idl"
|
||||||
|
#include "natupnp.idl"
|
||||||
|
|
|
@ -2,11 +2,11 @@ HKCR
|
||||||
{
|
{
|
||||||
NoRemove Typelib
|
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'
|
FLAGS = s '0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,22 @@ HKCR
|
||||||
}
|
}
|
||||||
NoRemove CLSID
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -25,12 +24,10 @@
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "initguid.h"
|
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
@ -238,6 +236,10 @@ static HRESULT WINAPI netfw_rules_get__NewEnum(
|
||||||
fw_rules *This = impl_from_INetFwRules( iface );
|
fw_rules *This = impl_from_INetFwRules( iface );
|
||||||
|
|
||||||
FIXME("%p, %p\n", This, newEnum);
|
FIXME("%p, %p\n", This, newEnum);
|
||||||
|
|
||||||
|
if (!newEnum) return E_POINTER;
|
||||||
|
*newEnum = NULL;
|
||||||
|
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,11 +643,8 @@ static HRESULT WINAPI fwpolicy2_get_Rules(INetFwPolicy2 *iface, INetFwRules **ru
|
||||||
if(!rules)
|
if(!rules)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
if(rules)
|
|
||||||
{
|
|
||||||
*rules = This->fw_policy2_rules;
|
*rules = This->fw_policy2_rules;
|
||||||
INetFwRules_AddRef(This->fw_policy2_rules);
|
INetFwRules_AddRef(This->fw_policy2_rules);
|
||||||
}
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -27,9 +26,10 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
#include "natupnp.h"
|
||||||
|
|
||||||
|
#include "wine/heap.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
@ -603,3 +603,173 @@ HRESULT NetFwOpenPorts_create( IUnknown *pUnkOuter, LPVOID *ppObj )
|
||||||
TRACE("returning iface %p\n", *ppObj);
|
TRACE("returning iface %p\n", *ppObj);
|
||||||
return S_OK;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@
|
||||||
#include "netfw.h"
|
#include "netfw.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "hnetcfg_private.h"
|
#include "hnetcfg_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
|
||||||
|
|
|
@ -72,7 +72,7 @@ dll/win32/fusion # Synced to WineStaging-3.17
|
||||||
dll/win32/gdiplus # Synced to WineStaging-4.0
|
dll/win32/gdiplus # Synced to WineStaging-4.0
|
||||||
dll/win32/hhctrl.ocx # Synced to WineStaging-4.0
|
dll/win32/hhctrl.ocx # Synced to WineStaging-4.0
|
||||||
dll/win32/hlink # 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/httpapi # Synced to WineStaging-3.3
|
||||||
dll/win32/iccvid # Synced to WineStaging-4.0
|
dll/win32/iccvid # Synced to WineStaging-4.0
|
||||||
dll/win32/ieframe # Synced to WineStaging-4.0
|
dll/win32/ieframe # Synced to WineStaging-4.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue