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
30 #include "wine/debug.h"
31 #include "hnetcfg_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg
);
35 typedef struct fw_policy
37 INetFwPolicy INetFwPolicy_iface
;
41 static inline fw_policy
*impl_from_INetFwPolicy( INetFwPolicy
*iface
)
43 return CONTAINING_RECORD(iface
, fw_policy
, INetFwPolicy_iface
);
46 typedef struct fw_policy2
48 INetFwPolicy2 INetFwPolicy2_iface
;
49 INetFwRules
*fw_policy2_rules
;
53 static inline fw_policy2
*impl_from_INetFwPolicy2( INetFwPolicy2
*iface
)
55 return CONTAINING_RECORD(iface
, fw_policy2
, INetFwPolicy2_iface
);
58 typedef struct fw_rules
60 INetFwRules INetFwRules_iface
;
64 static inline fw_rules
*impl_from_INetFwRules( INetFwRules
*iface
)
66 return CONTAINING_RECORD(iface
, fw_rules
, INetFwRules_iface
);
69 static HRESULT WINAPI
netfw_rules_QueryInterface(
74 fw_rules
*This
= impl_from_INetFwRules( iface
);
76 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), object
);
78 if ( IsEqualGUID( riid
, &IID_INetFwRules
) ||
79 IsEqualGUID( riid
, &IID_IDispatch
) ||
80 IsEqualGUID( riid
, &IID_IUnknown
) )
86 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
89 INetFwRules_AddRef( iface
);
93 static ULONG WINAPI
netfw_rules_AddRef(
96 fw_rules
*This
= impl_from_INetFwRules( iface
);
97 return InterlockedIncrement( &This
->refs
);
100 static ULONG WINAPI
netfw_rules_Release(
103 fw_rules
*This
= impl_from_INetFwRules( iface
);
104 LONG refs
= InterlockedDecrement( &This
->refs
);
107 TRACE("destroying %p\n", This
);
108 HeapFree( GetProcessHeap(), 0, This
);
113 static HRESULT WINAPI
netfw_rules_GetTypeInfoCount(
117 fw_rules
*This
= impl_from_INetFwRules( iface
);
119 TRACE("%p %p\n", This
, pctinfo
);
124 static HRESULT WINAPI
netfw_rules_GetTypeInfo(
130 fw_rules
*This
= impl_from_INetFwRules( iface
);
132 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, ppTInfo
);
133 return get_typeinfo( INetFwRules_tid
, ppTInfo
);
136 static HRESULT WINAPI
netfw_rules_GetIDsOfNames(
144 fw_rules
*This
= impl_from_INetFwRules( iface
);
148 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
150 hr
= get_typeinfo( INetFwRules_tid
, &typeinfo
);
153 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
154 ITypeInfo_Release( typeinfo
);
159 static HRESULT WINAPI
netfw_rules_Invoke(
165 DISPPARAMS
*pDispParams
,
167 EXCEPINFO
*pExcepInfo
,
170 fw_rules
*This
= impl_from_INetFwRules( iface
);
174 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
175 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
177 hr
= get_typeinfo( INetFwRules_tid
, &typeinfo
);
180 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwRules_iface
, dispIdMember
,
181 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
182 ITypeInfo_Release( typeinfo
);
187 static HRESULT WINAPI
netfw_rules_get_Count(
191 fw_rules
*This
= impl_from_INetFwRules( iface
);
193 FIXME("%p, %p\n", This
, count
);
201 static HRESULT WINAPI
netfw_rules_Add(
205 fw_rules
*This
= impl_from_INetFwRules( iface
);
207 FIXME("%p, %p\n", This
, rule
);
211 static HRESULT WINAPI
netfw_rules_Remove(
215 fw_rules
*This
= impl_from_INetFwRules( iface
);
217 FIXME("%p, %s\n", This
, debugstr_w(name
));
221 static HRESULT WINAPI
netfw_rules_Item(
226 fw_rules
*This
= impl_from_INetFwRules( iface
);
228 FIXME("%p, %s, %p\n", This
, debugstr_w(name
), rule
);
232 static HRESULT WINAPI
netfw_rules_get__NewEnum(
236 fw_rules
*This
= impl_from_INetFwRules( iface
);
238 FIXME("%p, %p\n", This
, newEnum
);
240 if (!newEnum
) return E_POINTER
;
246 static const struct INetFwRulesVtbl fw_rules_vtbl
=
248 netfw_rules_QueryInterface
,
251 netfw_rules_GetTypeInfoCount
,
252 netfw_rules_GetTypeInfo
,
253 netfw_rules_GetIDsOfNames
,
255 netfw_rules_get_Count
,
259 netfw_rules_get__NewEnum
262 static HRESULT
create_INetFwRules(INetFwRules
**object
)
266 TRACE("(%p)\n", object
);
268 rules
= HeapAlloc( GetProcessHeap(), 0, sizeof(*rules
) );
269 if (!rules
) return E_OUTOFMEMORY
;
271 rules
->INetFwRules_iface
.lpVtbl
= &fw_rules_vtbl
;
274 *object
= &rules
->INetFwRules_iface
;
276 TRACE("returning iface %p\n", *object
);
280 static ULONG WINAPI
fw_policy_AddRef(
281 INetFwPolicy
*iface
)
283 fw_policy
*fw_policy
= impl_from_INetFwPolicy( iface
);
284 return InterlockedIncrement( &fw_policy
->refs
);
287 static ULONG WINAPI
fw_policy_Release(
288 INetFwPolicy
*iface
)
290 fw_policy
*fw_policy
= impl_from_INetFwPolicy( iface
);
291 LONG refs
= InterlockedDecrement( &fw_policy
->refs
);
294 TRACE("destroying %p\n", fw_policy
);
295 HeapFree( GetProcessHeap(), 0, fw_policy
);
300 static HRESULT WINAPI
fw_policy_QueryInterface(
305 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
307 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), ppvObject
);
309 if ( IsEqualGUID( riid
, &IID_INetFwPolicy
) ||
310 IsEqualGUID( riid
, &IID_IDispatch
) ||
311 IsEqualGUID( riid
, &IID_IUnknown
) )
317 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
318 return E_NOINTERFACE
;
320 INetFwPolicy_AddRef( iface
);
324 static HRESULT WINAPI
fw_policy_GetTypeInfoCount(
328 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
330 TRACE("%p %p\n", This
, pctinfo
);
335 static HRESULT WINAPI
fw_policy_GetTypeInfo(
339 ITypeInfo
**ppTInfo
)
341 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
343 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, ppTInfo
);
344 return get_typeinfo( INetFwPolicy_tid
, ppTInfo
);
347 static HRESULT WINAPI
fw_policy_GetIDsOfNames(
355 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
359 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
361 hr
= get_typeinfo( INetFwPolicy_tid
, &typeinfo
);
364 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
365 ITypeInfo_Release( typeinfo
);
370 static HRESULT WINAPI
fw_policy_Invoke(
376 DISPPARAMS
*pDispParams
,
378 EXCEPINFO
*pExcepInfo
,
381 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
385 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
386 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
388 hr
= get_typeinfo( INetFwPolicy_tid
, &typeinfo
);
391 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwPolicy_iface
, dispIdMember
,
392 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
393 ITypeInfo_Release( typeinfo
);
398 static HRESULT WINAPI
fw_policy_get_CurrentProfile(
400 INetFwProfile
**profile
)
402 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
404 TRACE("%p, %p\n", This
, profile
);
405 return NetFwProfile_create( NULL
, (void **)profile
);
408 static HRESULT WINAPI
fw_policy_GetProfileByType(
410 NET_FW_PROFILE_TYPE profileType
,
411 INetFwProfile
**profile
)
413 fw_policy
*This
= impl_from_INetFwPolicy( iface
);
415 FIXME("%p, %u, %p\n", This
, profileType
, profile
);
419 static const struct INetFwPolicyVtbl fw_policy_vtbl
=
421 fw_policy_QueryInterface
,
424 fw_policy_GetTypeInfoCount
,
425 fw_policy_GetTypeInfo
,
426 fw_policy_GetIDsOfNames
,
428 fw_policy_get_CurrentProfile
,
429 fw_policy_GetProfileByType
432 HRESULT
NetFwPolicy_create( IUnknown
*pUnkOuter
, LPVOID
*ppObj
)
436 TRACE("(%p,%p)\n", pUnkOuter
, ppObj
);
438 fp
= HeapAlloc( GetProcessHeap(), 0, sizeof(*fp
) );
439 if (!fp
) return E_OUTOFMEMORY
;
441 fp
->INetFwPolicy_iface
.lpVtbl
= &fw_policy_vtbl
;
444 *ppObj
= &fp
->INetFwPolicy_iface
;
446 TRACE("returning iface %p\n", *ppObj
);
450 static HRESULT WINAPI
fwpolicy2_QueryInterface(INetFwPolicy2
*iface
, REFIID riid
, void **out
)
452 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
454 TRACE("%p %s %p\n", This
, debugstr_guid( riid
), out
);
456 if ( IsEqualGUID( riid
, &IID_INetFwPolicy2
) ||
457 IsEqualGUID( riid
, &IID_IDispatch
) ||
458 IsEqualGUID( riid
, &IID_IUnknown
) )
462 else if( IsEqualGUID( riid
, &IID_INetFwRules
) )
464 TRACE("INetFwRules not supported\n");
465 return E_NOINTERFACE
;
469 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
470 return E_NOINTERFACE
;
472 INetFwPolicy2_AddRef( iface
);
476 static ULONG WINAPI
fwpolicy2_AddRef(INetFwPolicy2
*iface
)
478 fw_policy2
*fw_policy
= impl_from_INetFwPolicy2( iface
);
479 return InterlockedIncrement( &fw_policy
->refs
);
482 static ULONG WINAPI
fwpolicy2_Release(INetFwPolicy2
*iface
)
484 fw_policy2
*fw_policy
= impl_from_INetFwPolicy2( iface
);
485 LONG refs
= InterlockedDecrement( &fw_policy
->refs
);
488 INetFwRules_Release(fw_policy
->fw_policy2_rules
);
489 TRACE("destroying %p\n", fw_policy
);
490 HeapFree( GetProcessHeap(), 0, fw_policy
);
495 static HRESULT WINAPI
fwpolicy2_GetTypeInfoCount(INetFwPolicy2
*iface
, UINT
*pctinfo
)
497 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
499 TRACE("%p %p\n", This
, pctinfo
);
504 static HRESULT WINAPI
fwpolicy2_GetTypeInfo(INetFwPolicy2
*iface
, UINT iTInfo
, LCID lcid
, ITypeInfo
**info
)
506 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
508 TRACE("%p %u %u %p\n", This
, iTInfo
, lcid
, info
);
509 return get_typeinfo( INetFwPolicy2_tid
, info
);
512 static HRESULT WINAPI
fwpolicy2_GetIDsOfNames(INetFwPolicy2
*iface
, REFIID riid
, LPOLESTR
*rgszNames
,
513 UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
515 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
519 TRACE("%p %s %p %u %u %p\n", This
, debugstr_guid(riid
), rgszNames
, cNames
, lcid
, rgDispId
);
521 hr
= get_typeinfo( INetFwPolicy2_tid
, &typeinfo
);
524 hr
= ITypeInfo_GetIDsOfNames( typeinfo
, rgszNames
, cNames
, rgDispId
);
525 ITypeInfo_Release( typeinfo
);
530 static HRESULT WINAPI
fwpolicy2_Invoke(INetFwPolicy2
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
,
531 WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
533 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
537 TRACE("%p %d %s %d %d %p %p %p %p\n", This
, dispIdMember
, debugstr_guid(riid
),
538 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
540 hr
= get_typeinfo( INetFwPolicy2_tid
, &typeinfo
);
543 hr
= ITypeInfo_Invoke( typeinfo
, &This
->INetFwPolicy2_iface
, dispIdMember
,
544 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
545 ITypeInfo_Release( typeinfo
);
550 static HRESULT WINAPI
fwpolicy2_get_CurrentProfileTypes(INetFwPolicy2
*iface
, LONG
*profile
)
552 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
554 FIXME("%p %p\n", This
, profile
);
558 static HRESULT WINAPI
fwpolicy2_get_FirewallEnabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*enabled
)
560 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
562 FIXME("%p %d %p\n", This
, profileType
, enabled
);
566 static HRESULT WINAPI
fwpolicy2_put_FirewallEnabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL enabled
)
568 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
570 FIXME("%p %d %d\n", This
, profileType
, enabled
);
574 static HRESULT WINAPI
fwpolicy2_get_ExcludedInterfaces(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT
*interfaces
)
576 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
578 FIXME("%p %d %p\n", This
, profileType
, interfaces
);
582 static HRESULT WINAPI
fwpolicy2_put_ExcludedInterfaces(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT interfaces
)
584 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
585 FIXME("%p %d\n", This
, profileType
);
589 static HRESULT WINAPI
fwpolicy2_get_BlockAllInboundTraffic(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*block
)
591 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
593 FIXME("%p %d %p\n", This
, profileType
, block
);
597 static HRESULT WINAPI
fwpolicy2_put_BlockAllInboundTraffic(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL block
)
599 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
601 FIXME("%p %d %d\n", This
, profileType
, block
);
605 static HRESULT WINAPI
fwpolicy2_get_NotificationsDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*disabled
)
607 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
609 FIXME("%p %d %p\n", This
, profileType
, disabled
);
613 static HRESULT WINAPI
fwpolicy2_put_NotificationsDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL disabled
)
615 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
617 FIXME("%p %d %d\n", This
, profileType
, disabled
);
621 static HRESULT WINAPI
fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL
*disabled
)
623 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
625 FIXME("%p %d %p\n", This
, profileType
, disabled
);
629 static HRESULT WINAPI
fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, VARIANT_BOOL disabled
)
631 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
633 FIXME("%p %d %d\n", This
, profileType
, disabled
);
637 static HRESULT WINAPI
fwpolicy2_get_Rules(INetFwPolicy2
*iface
, INetFwRules
**rules
)
639 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
641 TRACE("%p %p\n", This
, rules
);
646 *rules
= This
->fw_policy2_rules
;
647 INetFwRules_AddRef(This
->fw_policy2_rules
);
652 static HRESULT WINAPI
fwpolicy2_get_ServiceRestriction(INetFwPolicy2
*iface
, INetFwServiceRestriction
**ServiceRestriction
)
654 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
656 FIXME("%p %p\n", This
, ServiceRestriction
);
660 static HRESULT WINAPI
fwpolicy2_EnableRuleGroup(INetFwPolicy2
*iface
, LONG bitmask
, BSTR group
, VARIANT_BOOL enable
)
662 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
664 FIXME("%p %d %s %d\n", This
, bitmask
, debugstr_w(group
), enable
);
668 static HRESULT WINAPI
fwpolicy2_IsRuleGroupEnabled(INetFwPolicy2
*iface
, LONG bitmask
, BSTR group
, VARIANT_BOOL
*enabled
)
670 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
672 FIXME("%p %d %s %p\n", This
, bitmask
, debugstr_w(group
), enabled
);
676 static HRESULT WINAPI
fwpolicy2_RestoreLocalFirewallDefaults(INetFwPolicy2
*iface
)
678 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
684 static HRESULT WINAPI
fwpolicy2_get_DefaultInboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION
*action
)
686 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
688 FIXME("%p %d %p\n", This
, profileType
, action
);
692 static HRESULT WINAPI
fwpolicy2_put_DefaultInboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION action
)
694 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
696 FIXME("%p %d %d\n", This
, profileType
, action
);
700 static HRESULT WINAPI
fwpolicy2_get_DefaultOutboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION
*action
)
702 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
704 FIXME("%p %d %p\n", This
, profileType
, action
);
708 static HRESULT WINAPI
fwpolicy2_put_DefaultOutboundAction(INetFwPolicy2
*iface
, NET_FW_PROFILE_TYPE2 profileType
, NET_FW_ACTION action
)
710 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
712 FIXME("%p %d %d\n", This
, profileType
, action
);
716 static HRESULT WINAPI
fwpolicy2_get_IsRuleGroupCurrentlyEnabled(INetFwPolicy2
*iface
, BSTR group
, VARIANT_BOOL
*enabled
)
718 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
720 FIXME("%p %s %p\n", This
, debugstr_w(group
), enabled
);
724 static HRESULT WINAPI
fwpolicy2_get_LocalPolicyModifyState(INetFwPolicy2
*iface
, NET_FW_MODIFY_STATE
*modifyState
)
726 fw_policy2
*This
= impl_from_INetFwPolicy2( iface
);
728 FIXME("%p %p\n", This
, modifyState
);
732 static const struct INetFwPolicy2Vtbl fw_policy2_vtbl
=
734 fwpolicy2_QueryInterface
,
737 fwpolicy2_GetTypeInfoCount
,
738 fwpolicy2_GetTypeInfo
,
739 fwpolicy2_GetIDsOfNames
,
741 fwpolicy2_get_CurrentProfileTypes
,
742 fwpolicy2_get_FirewallEnabled
,
743 fwpolicy2_put_FirewallEnabled
,
744 fwpolicy2_get_ExcludedInterfaces
,
745 fwpolicy2_put_ExcludedInterfaces
,
746 fwpolicy2_get_BlockAllInboundTraffic
,
747 fwpolicy2_put_BlockAllInboundTraffic
,
748 fwpolicy2_get_NotificationsDisabled
,
749 fwpolicy2_put_NotificationsDisabled
,
750 fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled
,
751 fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled
,
753 fwpolicy2_get_ServiceRestriction
,
754 fwpolicy2_EnableRuleGroup
,
755 fwpolicy2_IsRuleGroupEnabled
,
756 fwpolicy2_RestoreLocalFirewallDefaults
,
757 fwpolicy2_get_DefaultInboundAction
,
758 fwpolicy2_put_DefaultInboundAction
,
759 fwpolicy2_get_DefaultOutboundAction
,
760 fwpolicy2_put_DefaultOutboundAction
,
761 fwpolicy2_get_IsRuleGroupCurrentlyEnabled
,
762 fwpolicy2_get_LocalPolicyModifyState
765 HRESULT
NetFwPolicy2_create( IUnknown
*outer
, void **obj
)
769 TRACE("(%p,%p)\n", outer
, obj
);
771 fp
= HeapAlloc( GetProcessHeap(), 0, sizeof(*fp
) );
772 if (!fp
) return E_OUTOFMEMORY
;
774 fp
->INetFwPolicy2_iface
.lpVtbl
= &fw_policy2_vtbl
;
777 *obj
= &fp
->INetFwPolicy2_iface
;
779 if (FAILED(create_INetFwRules(&fp
->fw_policy2_rules
)))
781 HeapFree( GetProcessHeap(), 0, fp
);
782 return E_OUTOFMEMORY
;
785 TRACE("returning iface %p\n", *obj
);