Commit 4619b529 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

hnetcfg: Add IDispatch support for INetFwMgr, INetFwPolicy and INetFwProfile.

parent 9ff1b4c8
...@@ -106,7 +106,10 @@ static ITypeInfo *typeinfo[last_tid]; ...@@ -106,7 +106,10 @@ static ITypeInfo *typeinfo[last_tid];
static REFIID tid_id[] = static REFIID tid_id[] =
{ {
&IID_INetFwAuthorizedApplication, &IID_INetFwAuthorizedApplication,
&IID_INetFwAuthorizedApplications &IID_INetFwAuthorizedApplications,
&IID_INetFwMgr,
&IID_INetFwPolicy,
&IID_INetFwProfile
}; };
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
......
...@@ -20,6 +20,9 @@ enum type_id ...@@ -20,6 +20,9 @@ enum type_id
{ {
INetFwAuthorizedApplication_tid, INetFwAuthorizedApplication_tid,
INetFwAuthorizedApplications_tid, INetFwAuthorizedApplications_tid,
INetFwMgr_tid,
INetFwPolicy_tid,
INetFwProfile_tid,
last_tid last_tid
}; };
......
...@@ -96,8 +96,9 @@ static HRESULT WINAPI fw_manager_GetTypeInfoCount( ...@@ -96,8 +96,9 @@ static HRESULT WINAPI fw_manager_GetTypeInfoCount(
{ {
fw_manager *This = impl_from_INetFwMgr( iface ); fw_manager *This = impl_from_INetFwMgr( iface );
FIXME("%p %p\n", This, pctinfo); TRACE("%p %p\n", This, pctinfo);
return E_NOTIMPL; *pctinfo = 1;
return S_OK;
} }
static HRESULT WINAPI fw_manager_GetTypeInfo( static HRESULT WINAPI fw_manager_GetTypeInfo(
...@@ -108,8 +109,8 @@ static HRESULT WINAPI fw_manager_GetTypeInfo( ...@@ -108,8 +109,8 @@ static HRESULT WINAPI fw_manager_GetTypeInfo(
{ {
fw_manager *This = impl_from_INetFwMgr( iface ); fw_manager *This = impl_from_INetFwMgr( iface );
FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL; return get_typeinfo( INetFwMgr_tid, ppTInfo );
} }
static HRESULT WINAPI fw_manager_GetIDsOfNames( static HRESULT WINAPI fw_manager_GetIDsOfNames(
...@@ -121,9 +122,18 @@ static HRESULT WINAPI fw_manager_GetIDsOfNames( ...@@ -121,9 +122,18 @@ static HRESULT WINAPI fw_manager_GetIDsOfNames(
DISPID *rgDispId ) DISPID *rgDispId )
{ {
fw_manager *This = impl_from_INetFwMgr( iface ); 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); TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
return E_NOTIMPL;
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( static HRESULT WINAPI fw_manager_Invoke(
...@@ -138,10 +148,20 @@ static HRESULT WINAPI fw_manager_Invoke( ...@@ -138,10 +148,20 @@ static HRESULT WINAPI fw_manager_Invoke(
UINT *puArgErr ) UINT *puArgErr )
{ {
fw_manager *This = impl_from_INetFwMgr( iface ); 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); 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( static HRESULT WINAPI fw_manager_get_LocalPolicy(
......
...@@ -95,8 +95,9 @@ static HRESULT WINAPI fw_policy_GetTypeInfoCount( ...@@ -95,8 +95,9 @@ static HRESULT WINAPI fw_policy_GetTypeInfoCount(
{ {
fw_policy *This = impl_from_INetFwPolicy( iface ); fw_policy *This = impl_from_INetFwPolicy( iface );
FIXME("%p %p\n", This, pctinfo); TRACE("%p %p\n", This, pctinfo);
return E_NOTIMPL; *pctinfo = 1;
return S_OK;
} }
static HRESULT WINAPI fw_policy_GetTypeInfo( static HRESULT WINAPI fw_policy_GetTypeInfo(
...@@ -107,8 +108,8 @@ static HRESULT WINAPI fw_policy_GetTypeInfo( ...@@ -107,8 +108,8 @@ static HRESULT WINAPI fw_policy_GetTypeInfo(
{ {
fw_policy *This = impl_from_INetFwPolicy( iface ); fw_policy *This = impl_from_INetFwPolicy( iface );
FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL; return get_typeinfo( INetFwPolicy_tid, ppTInfo );
} }
static HRESULT WINAPI fw_policy_GetIDsOfNames( static HRESULT WINAPI fw_policy_GetIDsOfNames(
...@@ -120,9 +121,18 @@ static HRESULT WINAPI fw_policy_GetIDsOfNames( ...@@ -120,9 +121,18 @@ static HRESULT WINAPI fw_policy_GetIDsOfNames(
DISPID *rgDispId ) DISPID *rgDispId )
{ {
fw_policy *This = impl_from_INetFwPolicy( iface ); 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); TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
return E_NOTIMPL;
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( static HRESULT WINAPI fw_policy_Invoke(
...@@ -137,10 +147,20 @@ static HRESULT WINAPI fw_policy_Invoke( ...@@ -137,10 +147,20 @@ static HRESULT WINAPI fw_policy_Invoke(
UINT *puArgErr ) UINT *puArgErr )
{ {
fw_policy *This = impl_from_INetFwPolicy( iface ); 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); 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( static HRESULT WINAPI fw_policy_get_CurrentProfile(
......
...@@ -95,8 +95,9 @@ static HRESULT WINAPI fw_profile_GetTypeInfoCount( ...@@ -95,8 +95,9 @@ static HRESULT WINAPI fw_profile_GetTypeInfoCount(
{ {
fw_profile *This = impl_from_INetFwProfile( iface ); fw_profile *This = impl_from_INetFwProfile( iface );
FIXME("%p %p\n", This, pctinfo); TRACE("%p %p\n", This, pctinfo);
return E_NOTIMPL; *pctinfo = 1;
return S_OK;
} }
static HRESULT WINAPI fw_profile_GetTypeInfo( static HRESULT WINAPI fw_profile_GetTypeInfo(
...@@ -107,8 +108,8 @@ static HRESULT WINAPI fw_profile_GetTypeInfo( ...@@ -107,8 +108,8 @@ static HRESULT WINAPI fw_profile_GetTypeInfo(
{ {
fw_profile *This = impl_from_INetFwProfile( iface ); fw_profile *This = impl_from_INetFwProfile( iface );
FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL; return get_typeinfo( INetFwProfile_tid, ppTInfo );
} }
static HRESULT WINAPI fw_profile_GetIDsOfNames( static HRESULT WINAPI fw_profile_GetIDsOfNames(
...@@ -120,9 +121,18 @@ static HRESULT WINAPI fw_profile_GetIDsOfNames( ...@@ -120,9 +121,18 @@ static HRESULT WINAPI fw_profile_GetIDsOfNames(
DISPID *rgDispId ) DISPID *rgDispId )
{ {
fw_profile *This = impl_from_INetFwProfile( iface ); 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); TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
return E_NOTIMPL;
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( static HRESULT WINAPI fw_profile_Invoke(
...@@ -137,10 +147,20 @@ static HRESULT WINAPI fw_profile_Invoke( ...@@ -137,10 +147,20 @@ static HRESULT WINAPI fw_profile_Invoke(
UINT *puArgErr ) UINT *puArgErr )
{ {
fw_profile *This = impl_from_INetFwProfile( iface ); 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); 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( static HRESULT WINAPI fw_profile_get_Type(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment