From 4c6f195547616ed4c74b7dea49d20dd5ec16adf3 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 27 Sep 2014 19:37:39 +0000 Subject: [PATCH] [HNETCFG] * Sync with Wine 1.7.27. CORE-8540 svn path=/trunk/; revision=64352 --- reactos/dll/win32/hnetcfg/apps.c | 1 + reactos/dll/win32/hnetcfg/hnetcfg.c | 5 +++ reactos/dll/win32/hnetcfg/hnetcfg.idl | 8 +++++ reactos/dll/win32/hnetcfg/hnetcfg.rgs | 9 +++++ reactos/dll/win32/hnetcfg/hnetcfg_private.h | 2 ++ reactos/dll/win32/hnetcfg/port.c | 38 ++++++++++++++++----- reactos/media/doc/README.WINE | 2 +- 7 files changed, 55 insertions(+), 10 deletions(-) diff --git a/reactos/dll/win32/hnetcfg/apps.c b/reactos/dll/win32/hnetcfg/apps.c index 9e5b8896085..dac5f47233e 100644 --- a/reactos/dll/win32/hnetcfg/apps.c +++ b/reactos/dll/win32/hnetcfg/apps.c @@ -95,6 +95,7 @@ static REFIID tid_id[] = &IID_INetFwAuthorizedApplication, &IID_INetFwAuthorizedApplications, &IID_INetFwMgr, + &IID_INetFwOpenPort, &IID_INetFwPolicy, &IID_INetFwProfile }; diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.c b/reactos/dll/win32/hnetcfg/hnetcfg.c index 1f03b5044da..3a476ce7bcb 100644 --- a/reactos/dll/win32/hnetcfg/hnetcfg.c +++ b/reactos/dll/win32/hnetcfg/hnetcfg.c @@ -101,6 +101,7 @@ static const struct IClassFactoryVtbl hnetcfg_cf_vtbl = 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 }; BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -131,6 +132,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) { cf = &fw_app_cf.IClassFactory_iface; } + else if (IsEqualGUID( rclsid, &CLSID_NetFwOpenPort )) + { + cf = &fw_openport_cf.IClassFactory_iface; + } if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.idl b/reactos/dll/win32/hnetcfg/hnetcfg.idl index 0ba4be29f80..9934f6ac4b9 100644 --- a/reactos/dll/win32/hnetcfg/hnetcfg.idl +++ b/reactos/dll/win32/hnetcfg/hnetcfg.idl @@ -35,3 +35,11 @@ coclass NetFwMgr { interface INetFwMgr; } uuid(ec9846b3-2762-4a6b-a214-6acb603462d2) ] coclass NetFwAuthorizedApplication { interface INetFwAuthorizedApplications; } + +[ + helpstring("HNetCfg.FwOpenPort"), + progid("HNetCfg.FwOpenPort"), + threading(both), + uuid(0ca545c6-37ad-4a6c-bf92-9f7610067ef5) +] +coclass NetFwOpenPort { interface INetFwOpenPort; } diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.rgs b/reactos/dll/win32/hnetcfg/hnetcfg.rgs index 623e2399510..e74b8a2c9c9 100644 --- a/reactos/dll/win32/hnetcfg/hnetcfg.rgs +++ b/reactos/dll/win32/hnetcfg/hnetcfg.rgs @@ -15,6 +15,11 @@ HKCR InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } ProgId = s 'HNetCfg.FwAuthorizedApplication' } + '{0CA545C6-37AD-4A6C-BF92-9F7610067EF5}' = s 'HNetCfg.FwOpenPort' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + ProgId = s 'HNetCfg.FwOpenPort' + } } 'HNetCfg.FwMgr' = s 'HNetCfg.FwMgr' { @@ -24,4 +29,8 @@ HKCR { CLSID = s '{EC9846B3-2762-4A6B-A214-6ACB603462D2}' } + 'HNetCfg.FwOpenPort' = s 'HNetCfg.FwOpenPort' + { + CLSID = s '{0CA545C6-37AD-4A6C-BF92-9F7610067EF5}' + } } diff --git a/reactos/dll/win32/hnetcfg/hnetcfg_private.h b/reactos/dll/win32/hnetcfg/hnetcfg_private.h index d9f665cdfaf..ccf0cc79b70 100644 --- a/reactos/dll/win32/hnetcfg/hnetcfg_private.h +++ b/reactos/dll/win32/hnetcfg/hnetcfg_private.h @@ -42,6 +42,7 @@ enum type_id INetFwAuthorizedApplication_tid, INetFwAuthorizedApplications_tid, INetFwMgr_tid, + INetFwOpenPort_tid, INetFwPolicy_tid, INetFwProfile_tid, last_tid @@ -55,6 +56,7 @@ HRESULT NetFwProfile_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT NetFwAuthorizedApplication_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; 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; #endif /* _HNETCFG_PRIVATE_H_ */ diff --git a/reactos/dll/win32/hnetcfg/port.c b/reactos/dll/win32/hnetcfg/port.c index 2392a3cb84e..186fa0a11ae 100644 --- a/reactos/dll/win32/hnetcfg/port.c +++ b/reactos/dll/win32/hnetcfg/port.c @@ -79,8 +79,9 @@ static HRESULT WINAPI fw_port_GetTypeInfoCount( { fw_port *This = impl_from_INetFwOpenPort( iface ); - FIXME("%p %p\n", This, pctinfo); - return E_NOTIMPL; + TRACE("%p %p\n", This, pctinfo); + *pctinfo = 1; + return S_OK; } static HRESULT WINAPI fw_port_GetTypeInfo( @@ -91,8 +92,8 @@ static HRESULT WINAPI fw_port_GetTypeInfo( { fw_port *This = impl_from_INetFwOpenPort( iface ); - FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); + return get_typeinfo( INetFwOpenPort_tid, ppTInfo ); } static HRESULT WINAPI fw_port_GetIDsOfNames( @@ -104,9 +105,18 @@ static HRESULT WINAPI fw_port_GetIDsOfNames( DISPID *rgDispId ) { fw_port *This = impl_from_INetFwOpenPort( iface ); + ITypeInfo *typeinfo; + HRESULT hr; - FIXME("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); - return E_NOTIMPL; + TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + + hr = get_typeinfo( INetFwOpenPort_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId ); + ITypeInfo_Release( typeinfo ); + } + return hr; } static HRESULT WINAPI fw_port_Invoke( @@ -121,10 +131,20 @@ static HRESULT WINAPI fw_port_Invoke( UINT *puArgErr ) { fw_port *This = impl_from_INetFwOpenPort( iface ); + ITypeInfo *typeinfo; + HRESULT hr; - FIXME("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid), + TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + + hr = get_typeinfo( INetFwOpenPort_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke( typeinfo, &This->INetFwOpenPort_iface, dispIdMember, + wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr ); + ITypeInfo_Release( typeinfo ); + } + return hr; } static HRESULT WINAPI fw_port_get_Name( @@ -305,7 +325,7 @@ static const struct INetFwOpenPortVtbl fw_port_vtbl = fw_port_get_BuiltIn }; -static HRESULT NetFwOpenPort_create( IUnknown *pUnkOuter, LPVOID *ppObj ) +HRESULT NetFwOpenPort_create( IUnknown *pUnkOuter, LPVOID *ppObj ) { fw_port *fp; diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index f7489149b60..855090ad330 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -78,7 +78,7 @@ reactos/dll/win32/fusion # Synced to Wine-1.7.27 reactos/dll/win32/gdiplus # Synced to Wine-1.7.27 reactos/dll/win32/hhctrl.ocx # Synced to Wine-1.7.27 reactos/dll/win32/hlink # Synced to Wine-1.7.17 -reactos/dll/win32/hnetcfg # Synced to Wine-1.7.17 +reactos/dll/win32/hnetcfg # Synced to Wine-1.7.27 reactos/dll/win32/httpapi # Synced to Wine-1.7.17 reactos/dll/win32/iccvid # Synced to Wine-1.7.17 reactos/dll/win32/icmp # Out of sync