2 * Copyright 2009 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
33 #include "hnetcfg_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg
);
37 typedef struct fw_policy
39 INetFwPolicy INetFwPolicy_iface
;
43 static inline fw_policy
*impl_from_INetFwPolicy( INetFwPolicy
*iface
)
45 return CONTAINING_RECORD(iface
, fw_policy
, INetFwPolicy_iface
);
48 typedef struct fw_policy2
50 INetFwPolicy2 INetFwPolicy2_iface
;
51 INetFwRules
*fw_policy2_rules
;
55 static inline fw_policy2
*impl_from_INetFwPolicy2( INetFwPolicy2
*iface
)
57 return CONTAINING_RECORD(iface
, fw_policy2
, INetFwPolicy2_iface
);
60 typedef struct fw_rules
62 INetFwRules INetFwRules_iface
;
66 static inline fw_rules
*impl_from_INetFwRules( INetFwRules
*iface
)
68 return CONTAINING_RECORD(iface
, fw_rules
, INetFwRules_iface
);
71 static HRESULT WINAPI
netfw_rules_QueryInterface(
76 fw_rules
*This
= impl_from_INetFwRules( iface
);
78 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), object
);
80 if ( IsEqualGUID( riid
, &IID_INetFwRules
) ||
81 IsEqualGUID( riid
, &IID_IDispatch
) ||
82 IsEqualGUID( riid
, &IID_IUnknown
) )
88 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
91 INetFwRules_AddRef( iface
);
95 static ULONG WINAPI
netfw_rules_AddRef(
98 fw_rules
*This
= impl_from_INetFwRules( iface
);
99 return InterlockedIncrement( &This
->refs
);
102 static ULONG WINAPI
netfw_rules_Release(
105 fw_rules
*This
= impl_from_INetFwRules( iface
);
106 LONG refs
= InterlockedDecrement( &This
->refs
);
109 TRACE("destroying %p\n", This
);
110 HeapFree( GetProcessHeap(), 0, This
);
115 static HRESULT WINAPI
netfw_rules_GetTypeInfoCount(
119 fw_rules
*This
= impl_from_INetFwRules( iface
);
121 TRACE("%p %p\n", This
, pctinfo
);
126 static HRESULT WINAPI
netfw_rules_GetTypeInfo(
132 fw_rules
*This
= impl_from_INetFwRules( iface
);
134 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, ppTInfo
);
135 return get_typeinfo( INetFwRules_tid
, ppTInfo
);
138 static HRESULT WINAPI
netfw_rules_GetIDsOfNames(
146 fw_rules
*This
= impl_from_INetFwRules( iface
);
150 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
152 hr
= get_typeinfo( INetFwRules_tid
, &typeinfo
);
155 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
156 ITypeInfo_Release( typeinfo
);
161 static HRESULT WINAPI
netfw_rules_Invoke(
167 DISPPARAMS
*pDispParams
,
169 EXCEPINFO
*pExcepInfo
,
172 fw_rules
*This
= impl_from_INetFwRules( iface
);
176 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
177 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
179 hr
= get_typeinfo( INetFwRules_tid
, &typeinfo
);
182 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwRules_iface
, dispIdMember
,
183 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
184 ITypeInfo_Release( typeinfo
);
189 static HRESULT WINAPI
netfw_rules_get_Count(
193 fw_rules
*This
= impl_from_INetFwRules( iface
);
195 FIXME("%p, %p\n", This
, count
);
203 static HRESULT WINAPI
netfw_rules_Add(
207 fw_rules
*This
= impl_from_INetFwRules( iface
);
209 FIXME("%p, %p\n", This
, rule
);
213 static HRESULT WINAPI
netfw_rules_Remove(
217 fw_rules
*This
= impl_from_INetFwRules( iface
);
219 FIXME("%p, %s\n", This
, debugstr_w(name
));
223 static HRESULT WINAPI
netfw_rules_Item(
228 fw_rules
*This
= impl_from_INetFwRules( iface
);
230 FIXME("%p, %s, %p\n", This
, debugstr_w(name
), rule
);
234 static HRESULT WINAPI
netfw_rules_get__NewEnum(
238 fw_rules
*This
= impl_from_INetFwRules( iface
);
240 FIXME("%p, %p\n", This
, newEnum
);
244 static const struct INetFwRulesVtbl fw_rules_vtbl
=
246 netfw_rules_QueryInterface
,
249 netfw_rules_GetTypeInfoCount
,
250 netfw_rules_GetTypeInfo
,
251 netfw_rules_GetIDsOfNames
,
253 netfw_rules_get_Count
,
257 netfw_rules_get__NewEnum
260 static HRESULT
create_INetFwRules(INetFwRules
**object
)
264 TRACE("(%p)\n", object
);
266 rules
= HeapAlloc( GetProcessHeap(), 0, sizeof(*rules
) );
267 if (!rules
) return E_OUTOFMEMORY
;
269 rules
->INetFwRules_iface
.lpVtbl
= &fw_rules_vtbl
;
272 *object
= &rules
->INetFwRules_iface
;
274 TRACE("returning iface %p\n", *object
);
278 static ULONG WINAPI
fw_policy_AddRef(
279 INetFwPolicy
*iface
)
281 fw_policy
*fw_policy
= impl_from_INetFwPolicy( iface
);
282 return InterlockedIncrement( &fw_policy
->refs
);
285 static ULONG WINAPI
fw_policy_Release(
286 INetFwPolicy
*iface
)
288 fw_policy
*fw_policy
= impl_from_INetFwPolicy( iface
);
289 LONG refs
= InterlockedDecrement( &fw_policy
->refs
);
292 TRACE("destroying %p\n", fw_policy
);
293 HeapFree( GetProcessHeap(), 0, fw_policy
);
298 static HRESULT WINAPI
fw_policy_QueryInterface(
303 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
305 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), ppvObject
);
307 if ( IsEqualGUID( riid
, &IID_INetFwPolicy
) ||
308 IsEqualGUID( riid
, &IID_IDispatch
) ||
309 IsEqualGUID( riid
, &IID_IUnknown
) )
315 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
316 return E_NOINTERFACE
;
318 INetFwPolicy_AddRef( iface
);
322 static HRESULT WINAPI
fw_policy_GetTypeInfoCount(
326 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
328 TRACE("%p %p\n", This
, pctinfo
);
333 static HRESULT WINAPI
fw_policy_GetTypeInfo(
337 ITypeInfo
**ppTInfo
)
339 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
341 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, ppTInfo
);
342 return get_typeinfo( INetFwPolicy_tid
, ppTInfo
);
345 static HRESULT WINAPI
fw_policy_GetIDsOfNames(
353 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
357 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
359 hr
= get_typeinfo( INetFwPolicy_tid
, &typeinfo
);
362 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
363 ITypeInfo_Release( typeinfo
);
368 static HRESULT WINAPI
fw_policy_Invoke(
374 DISPPARAMS
*pDispParams
,
376 EXCEPINFO
*pExcepInfo
,
379 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
383 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
384 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
386 hr
= get_typeinfo( INetFwPolicy_tid
, &typeinfo
);
389 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwPolicy_iface
, dispIdMember
,
390 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
391 ITypeInfo_Release( typeinfo
);
396 static HRESULT WINAPI
fw_policy_get_CurrentProfile(
398 INetFwProfile
**profile
)
400 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
402 TRACE("%p, %p\n", This
, profile
);
403 return NetFwProfile_create( NULL
, (void **)profile
);
406 static HRESULT WINAPI
fw_policy_GetProfileByType(
408 NET_FW_PROFILE_TYPE profileType
,
409 INetFwProfile
**profile
)
411 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
413 FIXME("%p, %u, %p\n", This
, profileType
, profile
);
417 static const struct INetFwPolicyVtbl fw_policy_vtbl
=
419 fw_policy_QueryInterface
,
422 fw_policy_GetTypeInfoCount
,
423 fw_policy_GetTypeInfo
,
424 fw_policy_GetIDsOfNames
,
426 fw_policy_get_CurrentProfile
,
427 fw_policy_GetProfileByType
430 HRESULT
NetFwPolicy_create( IUnknown
*pUnkOuter
, LPVOID
*ppObj
)
434 TRACE("(%p,%p)\n", pUnkOuter
, ppObj
);
436 fp
= HeapAlloc( GetProcessHeap(), 0, sizeof(*fp
) );
437 if (!fp
) return E_OUTOFMEMORY
;
439 fp
->INetFwPolicy_iface
.lpVtbl
= &fw_policy_vtbl
;
442 *ppObj
= &fp
->INetFwPolicy_iface
;
444 TRACE("returning iface %p\n", *ppObj
);
448 static HRESULT WINAPI
fwpolicy2_QueryInterface(INetFwPolicy2
*iface
, REFIID riid
, void **out
)
450 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
452 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), out
);
454 if ( IsEqualGUID( riid
, &IID_INetFwPolicy2
) ||
455 IsEqualGUID( riid
, &IID_IDispatch
) ||
456 IsEqualGUID( riid
, &IID_IUnknown
) )
460 else if( IsEqualGUID( riid
, &IID_INetFwRules
) )
462 TRACE("INetFwRules not supported\n");
463 return E_NOINTERFACE
;
467 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
468 return E_NOINTERFACE
;
470 INetFwPolicy2_AddRef( iface
);
474 static ULONG WINAPI
fwpolicy2_AddRef(INetFwPolicy2
*iface
)
476 fw_policy2
*fw_policy
= impl_from_INetFwPolicy2( iface
);
477 return InterlockedIncrement( &fw_policy
->refs
);
480 static ULONG WINAPI
fwpolicy2_Release(INetFwPolicy2
*iface
)
482 fw_policy2
*fw_policy
= impl_from_INetFwPolicy2( iface
);
483 LONG refs
= InterlockedDecrement( &fw_policy
->refs
);
486 INetFwRules_Release(fw_policy
->fw_policy2_rules
);
487 TRACE("destroying %p\n", fw_policy
);
488 HeapFree( GetProcessHeap(), 0, fw_policy
);
493 static HRESULT WINAPI
fwpolicy2_GetTypeInfoCount(INetFwPolicy2
*iface
, UINT
*pctinfo
)
495 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
497 TRACE("%p %p\n", This
, pctinfo
);
502 static HRESULT WINAPI
fwpolicy2_GetTypeInfo(INetFwPolicy2
*iface
, UINT iTInfo
, LCID lcid
, ITypeInfo
**info
)
504 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
506 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, info
);
507 return get_typeinfo( INetFwPolicy2_tid
, info
);
510 static HRESULT WINAPI
fwpolicy2_GetIDsOfNames(INetFwPolicy2
*iface
, REFIID riid
, LPOLESTR
*rgszNames
,
511 UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
513 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
517 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
519 hr
= get_typeinfo( INetFwPolicy2_tid
, &typeinfo
);
522 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
523 ITypeInfo_Release( typeinfo
);
528 static HRESULT WINAPI
fwpolicy2_Invoke(INetFwPolicy2
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
,
529 WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
531 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
535 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
536 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
538 hr
= get_typeinfo( INetFwPolicy2_tid
, &typeinfo
);
541 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwPolicy2_iface
, dispIdMember
,
542 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
543 ITypeInfo_Release( typeinfo
);
548 static HRESULT WINAPI
fwpolicy2_get_CurrentProfileTypes(INetFwPolicy2
*iface
, LONG
*profile
)
550 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
552 FIXME("%p %p\n", This
, profile
);
556 static HRESULT WINAPI
fwpolicy2_get_FirewallEnabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*enabled
)
558 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
560 FIXME("%p %d %p\n", This
, profileType
, enabled
);
564 static HRESULT WINAPI
fwpolicy2_put_FirewallEnabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL enabled
)
566 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
568 FIXME("%p %d %d\n", This
, profileType
, enabled
);
572 static HRESULT WINAPI
fwpolicy2_get_ExcludedInterfaces(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT
*interfaces
)
574 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
576 FIXME("%p %d %p\n", This
, profileType
, interfaces
);
580 static HRESULT WINAPI
fwpolicy2_put_ExcludedInterfaces(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT interfaces
)
582 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
583 FIXME("%p %d\n", This
, profileType
);
587 static HRESULT WINAPI
fwpolicy2_get_BlockAllInboundTraffic(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*block
)
589 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
591 FIXME("%p %d %p\n", This
, profileType
, block
);
595 static HRESULT WINAPI
fwpolicy2_put_BlockAllInboundTraffic(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL block
)
597 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
599 FIXME("%p %d %d\n", This
, profileType
, block
);
603 static HRESULT WINAPI
fwpolicy2_get_NotificationsDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*disabled
)
605 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
607 FIXME("%p %d %p\n", This
, profileType
, disabled
);
611 static HRESULT WINAPI
fwpolicy2_put_NotificationsDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL disabled
)
613 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
615 FIXME("%p %d %d\n", This
, profileType
, disabled
);
619 static HRESULT WINAPI
fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*disabled
)
621 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
623 FIXME("%p %d %p\n", This
, profileType
, disabled
);
627 static HRESULT WINAPI
fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL disabled
)
629 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
631 FIXME("%p %d %d\n", This
, profileType
, disabled
);
635 static HRESULT WINAPI
fwpolicy2_get_Rules(INetFwPolicy2
*iface
, INetFwRules
**rules
)
637 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
639 TRACE("%p %p\n", This
, rules
);
646 *rules
= This
->fw_policy2_rules
;
647 INetFwRules_AddRef(This
->fw_policy2_rules
);
653 static HRESULT WINAPI
fwpolicy2_get_ServiceRestriction(INetFwPolicy2
*iface
, INetFwServiceRestriction
**ServiceRestriction
)
655 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
657 FIXME("%p %p\n", This
, ServiceRestriction
);
661 static HRESULT WINAPI
fwpolicy2_EnableRuleGroup(INetFwPolicy2
*iface
, LONG bitmask
, BSTR group
, VARIANT_BOOL enable
)
663 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
665 FIXME("%p %d %s %d\n", This
, bitmask
, debugstr_w(group
), enable
);
669 static HRESULT WINAPI
fwpolicy2_IsRuleGroupEnabled(INetFwPolicy2
*iface
, LONG bitmask
, BSTR group
, VARIANT_BOOL
*enabled
)
671 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
673 FIXME("%p %d %s %p\n", This
, bitmask
, debugstr_w(group
), enabled
);
677 static HRESULT WINAPI
fwpolicy2_RestoreLocalFirewallDefaults(INetFwPolicy2
*iface
)
679 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
685 static HRESULT WINAPI
fwpolicy2_get_DefaultInboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION
*action
)
687 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
689 FIXME("%p %d %p\n", This
, profileType
, action
);
693 static HRESULT WINAPI
fwpolicy2_put_DefaultInboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION action
)
695 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
697 FIXME("%p %d %d\n", This
, profileType
, action
);
701 static HRESULT WINAPI
fwpolicy2_get_DefaultOutboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION
*action
)
703 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
705 FIXME("%p %d %p\n", This
, profileType
, action
);
709 static HRESULT WINAPI
fwpolicy2_put_DefaultOutboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION action
)
711 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
713 FIXME("%p %d %d\n", This
, profileType
, action
);
717 static HRESULT WINAPI
fwpolicy2_get_IsRuleGroupCurrentlyEnabled(INetFwPolicy2
*iface
, BSTR group
, VARIANT_BOOL
*enabled
)
719 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
721 FIXME("%p %s %p\n", This
, debugstr_w(group
), enabled
);
725 static HRESULT WINAPI
fwpolicy2_get_LocalPolicyModifyState(INetFwPolicy2
*iface
, NET_FW_MODIFY_STATE
*modifyState
)
727 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
729 FIXME("%p %p\n", This
, modifyState
);
733 static const struct INetFwPolicy2Vtbl fw_policy2_vtbl
=
735 fwpolicy2_QueryInterface
,
738 fwpolicy2_GetTypeInfoCount
,
739 fwpolicy2_GetTypeInfo
,
740 fwpolicy2_GetIDsOfNames
,
742 fwpolicy2_get_CurrentProfileTypes
,
743 fwpolicy2_get_FirewallEnabled
,
744 fwpolicy2_put_FirewallEnabled
,
745 fwpolicy2_get_ExcludedInterfaces
,
746 fwpolicy2_put_ExcludedInterfaces
,
747 fwpolicy2_get_BlockAllInboundTraffic
,
748 fwpolicy2_put_BlockAllInboundTraffic
,
749 fwpolicy2_get_NotificationsDisabled
,
750 fwpolicy2_put_NotificationsDisabled
,
751 fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled
,
752 fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled
,
754 fwpolicy2_get_ServiceRestriction
,
755 fwpolicy2_EnableRuleGroup
,
756 fwpolicy2_IsRuleGroupEnabled
,
757 fwpolicy2_RestoreLocalFirewallDefaults
,
758 fwpolicy2_get_DefaultInboundAction
,
759 fwpolicy2_put_DefaultInboundAction
,
760 fwpolicy2_get_DefaultOutboundAction
,
761 fwpolicy2_put_DefaultOutboundAction
,
762 fwpolicy2_get_IsRuleGroupCurrentlyEnabled
,
763 fwpolicy2_get_LocalPolicyModifyState
766 HRESULT
NetFwPolicy2_create( IUnknown
*outer
, void **obj
)
770 TRACE("(%p,%p)\n", outer
, obj
);
772 fp
= HeapAlloc( GetProcessHeap(), 0, sizeof(*fp
) );
773 if (!fp
) return E_OUTOFMEMORY
;
775 fp
->INetFwPolicy2_iface
.lpVtbl
= &fw_policy2_vtbl
;
778 *obj
= &fp
->INetFwPolicy2_iface
;
780 if (FAILED(create_INetFwRules(&fp
->fw_policy2_rules
)))
782 HeapFree( GetProcessHeap(), 0, fp
);
783 return E_OUTOFMEMORY
;
786 TRACE("returning iface %p\n", *obj
);