[HNETCFG]

* Sync with Wine 1.7.1.
CORE-7469

svn path=/trunk/; revision=60212
This commit is contained in:
Amine Khaldi 2013-09-19 17:25:36 +00:00
parent 1cb0ae795c
commit a8917c6540
11 changed files with 251 additions and 56 deletions

View file

@ -1,7 +1,4 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(hnetcfg.dll hnetcfg.spec)
@ -14,18 +11,18 @@ list(APPEND SOURCE
port.c
profile.c
service.c
hnetcfg.rc
${CMAKE_CURRENT_BINARY_DIR}/hnetcfg.def)
add_library(hnetcfg SHARED ${SOURCE})
add_library(hnetcfg SHARED ${SOURCE} hnetcfg.rc)
add_typelib(hnetcfg_tlb.idl)
list(APPEND hnetcfg_rc_deps
${CMAKE_CURRENT_SOURCE_DIR}/hnetcfg.rgs
${CMAKE_CURRENT_SOURCE_DIR}/hnetcfg_tlb.rgs
${CMAKE_CURRENT_BINARY_DIR}/hnetcfg_tlb.tlb)
set_source_files_properties(hnetcfg.rc PROPERTIES OBJECT_DEPENDS "${hnetcfg_rc_deps}")
set_module_type(hnetcfg win32dll)
target_link_libraries(hnetcfg wine uuid)
add_importlibs(hnetcfg
ole32
advapi32
msvcrt
kernel32
ntdll)
add_importlibs(hnetcfg ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)

View file

@ -33,7 +33,7 @@
#include <netfw.h>
#include <wine/debug.h>
//#include "wine/unicode.h"
#include <wine/unicode.h>
#include "hnetcfg_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
@ -99,8 +99,55 @@ static HRESULT WINAPI fw_app_GetTypeInfoCount(
{
fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
FIXME("%p %p\n", This, pctinfo);
return E_NOTIMPL;
TRACE("%p %p\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
}
static ITypeLib *typelib;
static ITypeInfo *typeinfo[last_tid];
static REFIID tid_id[] =
{
&IID_INetFwAuthorizedApplication,
&IID_INetFwAuthorizedApplications,
&IID_INetFwMgr,
&IID_INetFwPolicy,
&IID_INetFwProfile
};
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
{
HRESULT hr;
if (!typelib)
{
ITypeLib *lib;
hr = LoadRegTypeLib( &LIBID_NetFwPublicTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &lib );
if (FAILED(hr))
{
ERR("LoadRegTypeLib failed: %08x\n", hr);
return hr;
}
if (InterlockedCompareExchangePointer( (void **)&typelib, lib, NULL ))
ITypeLib_Release( lib );
}
if (!typeinfo[tid])
{
ITypeInfo *info;
hr = ITypeLib_GetTypeInfoOfGuid( typelib, tid_id[tid], &info );
if (FAILED(hr))
{
ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_id[tid]), hr);
return hr;
}
if (InterlockedCompareExchangePointer( (void **)(typeinfo + tid), info, NULL ))
ITypeInfo_Release( info );
}
*ret = typeinfo[tid];
return S_OK;
}
static HRESULT WINAPI fw_app_GetTypeInfo(
@ -111,8 +158,8 @@ static HRESULT WINAPI fw_app_GetTypeInfo(
{
fw_app *This = impl_from_INetFwAuthorizedApplication( 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( INetFwAuthorizedApplication_tid, ppTInfo );
}
static HRESULT WINAPI fw_app_GetIDsOfNames(
@ -124,9 +171,18 @@ static HRESULT WINAPI fw_app_GetIDsOfNames(
DISPID *rgDispId )
{
fw_app *This = impl_from_INetFwAuthorizedApplication( 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( INetFwAuthorizedApplication_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_app_Invoke(
@ -141,10 +197,20 @@ static HRESULT WINAPI fw_app_Invoke(
UINT *puArgErr )
{
fw_app *This = impl_from_INetFwAuthorizedApplication( 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( INetFwAuthorizedApplication_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwAuthorizedApplication_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_app_get_Name(
@ -224,7 +290,7 @@ static HRESULT WINAPI fw_app_put_Scope(
fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
FIXME("%p, %u\n", This, scope);
return E_NOTIMPL;
return S_OK;
}
static HRESULT WINAPI fw_app_get_RemoteAddresses(
@ -382,8 +448,8 @@ static HRESULT WINAPI fw_apps_GetTypeInfo(
{
fw_apps *This = impl_from_INetFwAuthorizedApplications( 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( INetFwAuthorizedApplications_tid, ppTInfo );
}
static HRESULT WINAPI fw_apps_GetIDsOfNames(
@ -395,9 +461,18 @@ static HRESULT WINAPI fw_apps_GetIDsOfNames(
DISPID *rgDispId )
{
fw_apps *This = impl_from_INetFwAuthorizedApplications( 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( INetFwAuthorizedApplications_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_apps_Invoke(
@ -412,10 +487,20 @@ static HRESULT WINAPI fw_apps_Invoke(
UINT *puArgErr )
{
fw_apps *This = impl_from_INetFwAuthorizedApplications( 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( INetFwAuthorizedApplications_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwAuthorizedApplications_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_apps_get_Count(

View file

@ -128,8 +128,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

View file

@ -1 +1,3 @@
1 WINE_REGISTRY hnetcfg.rgs
2 WINE_REGISTRY hnetcfg_tlb.rgs
1 TYPELIB hnetcfg_tlb.tlb

View file

@ -16,6 +16,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
enum type_id
{
INetFwAuthorizedApplication_tid,
INetFwAuthorizedApplications_tid,
INetFwMgr_tid,
INetFwPolicy_tid,
INetFwProfile_tid,
last_tid
};
HRESULT get_typeinfo(enum type_id, ITypeInfo **) DECLSPEC_HIDDEN;
HRESULT NetFwMgr_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT NetFwPolicy_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT NetFwProfile_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;

View file

@ -0,0 +1,21 @@
/*
* Typelib for hnetcfg
*
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "netfw.idl"

View file

@ -0,0 +1,20 @@
HKCR
{
NoRemove Typelib
{
NoRemove '{DB4F3345-3EF8-45ED-B976-25A6D3B81B71}'
{
'1.0' = s 'NetFwPublicTypeLib'
{
'0' { win32 = s '%MODULE%' }
FLAGS = s '0'
}
}
}
NoRemove Interface
{
}
NoRemove CLSID
{
}
}

View file

@ -100,8 +100,9 @@ static HRESULT WINAPI fw_manager_GetTypeInfoCount(
{
fw_manager *This = impl_from_INetFwMgr( 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_manager_GetTypeInfo(
@ -112,8 +113,8 @@ static HRESULT WINAPI fw_manager_GetTypeInfo(
{
fw_manager *This = impl_from_INetFwMgr( 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( INetFwMgr_tid, ppTInfo );
}
static HRESULT WINAPI fw_manager_GetIDsOfNames(
@ -125,9 +126,18 @@ static HRESULT WINAPI fw_manager_GetIDsOfNames(
DISPID *rgDispId )
{
fw_manager *This = impl_from_INetFwMgr( 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( INetFwMgr_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_manager_Invoke(
@ -142,10 +152,20 @@ static HRESULT WINAPI fw_manager_Invoke(
UINT *puArgErr )
{
fw_manager *This = impl_from_INetFwMgr( 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( INetFwMgr_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwMgr_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_manager_get_LocalPolicy(

View file

@ -99,8 +99,9 @@ static HRESULT WINAPI fw_policy_GetTypeInfoCount(
{
fw_policy *This = impl_from_INetFwPolicy( 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_policy_GetTypeInfo(
@ -111,8 +112,8 @@ static HRESULT WINAPI fw_policy_GetTypeInfo(
{
fw_policy *This = impl_from_INetFwPolicy( 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( INetFwPolicy_tid, ppTInfo );
}
static HRESULT WINAPI fw_policy_GetIDsOfNames(
@ -124,9 +125,18 @@ static HRESULT WINAPI fw_policy_GetIDsOfNames(
DISPID *rgDispId )
{
fw_policy *This = impl_from_INetFwPolicy( 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( INetFwPolicy_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_policy_Invoke(
@ -141,10 +151,20 @@ static HRESULT WINAPI fw_policy_Invoke(
UINT *puArgErr )
{
fw_policy *This = impl_from_INetFwPolicy( 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( INetFwPolicy_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_policy_get_CurrentProfile(

View file

@ -99,8 +99,9 @@ static HRESULT WINAPI fw_profile_GetTypeInfoCount(
{
fw_profile *This = impl_from_INetFwProfile( 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_profile_GetTypeInfo(
@ -111,8 +112,8 @@ static HRESULT WINAPI fw_profile_GetTypeInfo(
{
fw_profile *This = impl_from_INetFwProfile( 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( INetFwProfile_tid, ppTInfo );
}
static HRESULT WINAPI fw_profile_GetIDsOfNames(
@ -124,9 +125,18 @@ static HRESULT WINAPI fw_profile_GetIDsOfNames(
DISPID *rgDispId )
{
fw_profile *This = impl_from_INetFwProfile( 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( INetFwProfile_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_profile_Invoke(
@ -141,10 +151,20 @@ static HRESULT WINAPI fw_profile_Invoke(
UINT *puArgErr )
{
fw_profile *This = impl_from_INetFwProfile( 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( INetFwProfile_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwProfile_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
static HRESULT WINAPI fw_profile_get_Type(

View file

@ -76,7 +76,7 @@ reactos/dll/win32/fusion # Synced to Wine-1.7.1
reactos/dll/win32/gdiplus # Synced to Wine-1.7.1
reactos/dll/win32/hhctrl.ocx # Synced to Wine-1.7.1
reactos/dll/win32/hlink # Synced to Wine-1.7.1
reactos/dll/win32/hnetcfg # Synced to Wine-1.5.4
reactos/dll/win32/hnetcfg # Synced to Wine-1.7.1
reactos/dll/win32/httpapi # Synced to Wine-1.5.4
reactos/dll/win32/iccvid # Synced to Wine-1.5.19
reactos/dll/win32/icmp # Synced to Wine-0_9_10