ReactOS  0.4.14-dev-114-gc8cbd56
policy.c
Go to the documentation of this file.
1 /*
2  * Copyright 2009 Hans Leidekker for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18 
19 #include <stdarg.h>
20 #include <stdio.h>
21 
22 #define COBJMACROS
23 
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "ole2.h"
28 #include "netfw.h"
29 
30 #include "wine/debug.h"
31 #include "hnetcfg_private.h"
32 
34 
35 typedef struct fw_policy
36 {
39 } fw_policy;
40 
42 {
43  return CONTAINING_RECORD(iface, fw_policy, INetFwPolicy_iface);
44 }
45 
46 typedef struct fw_policy2
47 {
51 } fw_policy2;
52 
54 {
55  return CONTAINING_RECORD(iface, fw_policy2, INetFwPolicy2_iface);
56 }
57 
58 typedef struct fw_rules
59 {
62 } fw_rules;
63 
64 static inline fw_rules *impl_from_INetFwRules( INetFwRules *iface )
65 {
66  return CONTAINING_RECORD(iface, fw_rules, INetFwRules_iface);
67 }
68 
70  INetFwRules *iface,
71  REFIID riid,
72  void **object)
73 {
75 
76  TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
77 
78  if ( IsEqualGUID( riid, &IID_INetFwRules ) ||
81  {
82  *object = iface;
83  }
84  else
85  {
86  FIXME("interface %s not implemented\n", debugstr_guid(riid));
87  return E_NOINTERFACE;
88  }
89  INetFwRules_AddRef( iface );
90  return S_OK;
91 }
92 
94  INetFwRules *iface )
95 {
97  return InterlockedIncrement( &This->refs );
98 }
99 
101  INetFwRules *iface )
102 {
103  fw_rules *This = impl_from_INetFwRules( iface );
104  LONG refs = InterlockedDecrement( &This->refs );
105  if (!refs)
106  {
107  TRACE("destroying %p\n", This);
108  HeapFree( GetProcessHeap(), 0, This );
109  }
110  return refs;
111 }
112 
114  INetFwRules *iface,
115  UINT *pctinfo )
116 {
117  fw_rules *This = impl_from_INetFwRules( iface );
118 
119  TRACE("%p %p\n", This, pctinfo);
120  *pctinfo = 1;
121  return S_OK;
122 }
123 
125  INetFwRules *iface,
126  UINT iTInfo,
127  LCID lcid,
128  ITypeInfo **ppTInfo)
129 {
130  fw_rules *This = impl_from_INetFwRules( iface );
131 
132  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
133  return get_typeinfo( INetFwRules_tid, ppTInfo );
134 }
135 
137  INetFwRules *iface,
138  REFIID riid,
139  LPOLESTR *rgszNames,
140  UINT cNames,
141  LCID lcid,
142  DISPID *rgDispId)
143 {
144  fw_rules *This = impl_from_INetFwRules( iface );
146  HRESULT hr;
147 
148  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
149 
151  if (SUCCEEDED(hr))
152  {
153  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
154  ITypeInfo_Release( typeinfo );
155  }
156  return hr;
157 }
158 
160  INetFwRules *iface,
161  DISPID dispIdMember,
162  REFIID riid,
163  LCID lcid,
164  WORD wFlags,
165  DISPPARAMS *pDispParams,
166  VARIANT *pVarResult,
167  EXCEPINFO *pExcepInfo,
168  UINT *puArgErr)
169 {
170  fw_rules *This = impl_from_INetFwRules( iface );
172  HRESULT hr;
173 
174  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
175  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
176 
178  if (SUCCEEDED(hr))
179  {
180  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwRules_iface, dispIdMember,
181  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
182  ITypeInfo_Release( typeinfo );
183  }
184  return hr;
185 }
186 
188  INetFwRules *iface,
189  LONG *count)
190 {
191  fw_rules *This = impl_from_INetFwRules( iface );
192 
193  FIXME("%p, %p\n", This, count);
194 
195  if (count)
196  *count = 0;
197 
198  return S_OK;
199 }
200 
202  INetFwRules *iface,
203  INetFwRule *rule)
204 {
205  fw_rules *This = impl_from_INetFwRules( iface );
206 
207  FIXME("%p, %p\n", This, rule);
208  return E_NOTIMPL;
209 }
210 
212  INetFwRules *iface,
213  BSTR name)
214 {
215  fw_rules *This = impl_from_INetFwRules( iface );
216 
217  FIXME("%p, %s\n", This, debugstr_w(name));
218  return E_NOTIMPL;
219 }
220 
222  INetFwRules *iface,
223  BSTR name,
224  INetFwRule **rule)
225 {
226  fw_rules *This = impl_from_INetFwRules( iface );
227 
228  FIXME("%p, %s, %p\n", This, debugstr_w(name), rule);
229  return E_NOTIMPL;
230 }
231 
233  INetFwRules *iface,
234  IUnknown **newEnum)
235 {
236  fw_rules *This = impl_from_INetFwRules( iface );
237 
238  FIXME("%p, %p\n", This, newEnum);
239 
240  if (!newEnum) return E_POINTER;
241  *newEnum = NULL;
242 
243  return E_NOTIMPL;
244 }
245 
246 static const struct INetFwRulesVtbl fw_rules_vtbl =
247 {
260 };
261 
263 {
264  fw_rules *rules;
265 
266  TRACE("(%p)\n", object);
267 
268  rules = HeapAlloc( GetProcessHeap(), 0, sizeof(*rules) );
269  if (!rules) return E_OUTOFMEMORY;
270 
271  rules->INetFwRules_iface.lpVtbl = &fw_rules_vtbl;
272  rules->refs = 1;
273 
274  *object = &rules->INetFwRules_iface;
275 
276  TRACE("returning iface %p\n", *object);
277  return S_OK;
278 }
279 
281  INetFwPolicy *iface )
282 {
284  return InterlockedIncrement( &fw_policy->refs );
285 }
286 
288  INetFwPolicy *iface )
289 {
292  if (!refs)
293  {
294  TRACE("destroying %p\n", fw_policy);
296  }
297  return refs;
298 }
299 
301  INetFwPolicy *iface,
302  REFIID riid,
303  void **ppvObject )
304 {
306 
307  TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
308 
309  if ( IsEqualGUID( riid, &IID_INetFwPolicy ) ||
312  {
313  *ppvObject = iface;
314  }
315  else
316  {
317  FIXME("interface %s not implemented\n", debugstr_guid(riid));
318  return E_NOINTERFACE;
319  }
320  INetFwPolicy_AddRef( iface );
321  return S_OK;
322 }
323 
325  INetFwPolicy *iface,
326  UINT *pctinfo )
327 {
329 
330  TRACE("%p %p\n", This, pctinfo);
331  *pctinfo = 1;
332  return S_OK;
333 }
334 
336  INetFwPolicy *iface,
337  UINT iTInfo,
338  LCID lcid,
339  ITypeInfo **ppTInfo )
340 {
342 
343  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
344  return get_typeinfo( INetFwPolicy_tid, ppTInfo );
345 }
346 
348  INetFwPolicy *iface,
349  REFIID riid,
350  LPOLESTR *rgszNames,
351  UINT cNames,
352  LCID lcid,
353  DISPID *rgDispId )
354 {
357  HRESULT hr;
358 
359  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
360 
362  if (SUCCEEDED(hr))
363  {
364  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
365  ITypeInfo_Release( typeinfo );
366  }
367  return hr;
368 }
369 
371  INetFwPolicy *iface,
372  DISPID dispIdMember,
373  REFIID riid,
374  LCID lcid,
375  WORD wFlags,
376  DISPPARAMS *pDispParams,
377  VARIANT *pVarResult,
378  EXCEPINFO *pExcepInfo,
379  UINT *puArgErr )
380 {
383  HRESULT hr;
384 
385  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
386  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
387 
389  if (SUCCEEDED(hr))
390  {
391  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy_iface, dispIdMember,
392  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
393  ITypeInfo_Release( typeinfo );
394  }
395  return hr;
396 }
397 
399  INetFwPolicy *iface,
401 {
403 
404  TRACE("%p, %p\n", This, profile);
405  return NetFwProfile_create( NULL, (void **)profile );
406 }
407 
409  INetFwPolicy *iface,
410  NET_FW_PROFILE_TYPE profileType,
412 {
414 
415  FIXME("%p, %u, %p\n", This, profileType, profile);
416  return E_NOTIMPL;
417 }
418 
419 static const struct INetFwPolicyVtbl fw_policy_vtbl =
420 {
430 };
431 
433 {
434  fw_policy *fp;
435 
436  TRACE("(%p,%p)\n", pUnkOuter, ppObj);
437 
438  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
439  if (!fp) return E_OUTOFMEMORY;
440 
441  fp->INetFwPolicy_iface.lpVtbl = &fw_policy_vtbl;
442  fp->refs = 1;
443 
444  *ppObj = &fp->INetFwPolicy_iface;
445 
446  TRACE("returning iface %p\n", *ppObj);
447  return S_OK;
448 }
449 
451 {
453 
454  TRACE("%p %s %p\n", This, debugstr_guid( riid ), out );
455 
456  if ( IsEqualGUID( riid, &IID_INetFwPolicy2 ) ||
459  {
460  *out = iface;
461  }
462  else if( IsEqualGUID( riid, &IID_INetFwRules ) )
463  {
464  TRACE("INetFwRules not supported\n");
465  return E_NOINTERFACE;
466  }
467  else
468  {
469  FIXME("interface %s not implemented\n", debugstr_guid(riid));
470  return E_NOINTERFACE;
471  }
472  INetFwPolicy2_AddRef( iface );
473  return S_OK;
474 }
475 
477 {
479  return InterlockedIncrement( &fw_policy->refs );
480 }
481 
483 {
486  if (!refs)
487  {
488  INetFwRules_Release(fw_policy->fw_policy2_rules);
489  TRACE("destroying %p\n", fw_policy);
491  }
492  return refs;
493 }
494 
496 {
498 
499  TRACE("%p %p\n", This, pctinfo);
500  *pctinfo = 1;
501  return S_OK;
502 }
503 
505 {
507 
508  TRACE("%p %u %u %p\n", This, iTInfo, lcid, info);
510 }
511 
513  UINT cNames, LCID lcid, DISPID *rgDispId)
514 {
517  HRESULT hr;
518 
519  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
520 
522  if (SUCCEEDED(hr))
523  {
524  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
525  ITypeInfo_Release( typeinfo );
526  }
527  return hr;
528 }
529 
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)
532 {
535  HRESULT hr;
536 
537  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
538  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
539 
541  if (SUCCEEDED(hr))
542  {
543  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy2_iface, dispIdMember,
544  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
545  ITypeInfo_Release( typeinfo );
546  }
547  return hr;
548 }
549 
551 {
553 
554  FIXME("%p %p\n", This, profile);
555  return E_NOTIMPL;
556 }
557 
559 {
561 
562  FIXME("%p %d %p\n", This, profileType, enabled);
563  return E_NOTIMPL;
564 }
565 
567 {
569 
570  FIXME("%p %d %d\n", This, profileType, enabled);
571  return E_NOTIMPL;
572 }
573 
575 {
577 
578  FIXME("%p %d %p\n", This, profileType, interfaces);
579  return E_NOTIMPL;
580 }
581 
583 {
585  FIXME("%p %d\n", This, profileType);
586  return E_NOTIMPL;
587 }
588 
590 {
592 
593  FIXME("%p %d %p\n", This, profileType, block);
594  return E_NOTIMPL;
595 }
596 
598 {
600 
601  FIXME("%p %d %d\n", This, profileType, block);
602  return E_NOTIMPL;
603 }
604 
606 {
608 
609  FIXME("%p %d %p\n", This, profileType, disabled);
610  return E_NOTIMPL;
611 }
612 
614 {
616 
617  FIXME("%p %d %d\n", This, profileType, disabled);
618  return E_NOTIMPL;
619 }
620 
622 {
624 
625  FIXME("%p %d %p\n", This, profileType, disabled);
626  return E_NOTIMPL;
627 }
628 
630 {
632 
633  FIXME("%p %d %d\n", This, profileType, disabled);
634  return E_NOTIMPL;
635 }
636 
638 {
640 
641  TRACE("%p %p\n", This, rules);
642 
643  if(!rules)
644  return E_POINTER;
645 
646  *rules = This->fw_policy2_rules;
647  INetFwRules_AddRef(This->fw_policy2_rules);
648 
649  return S_OK;
650 }
651 
653 {
655 
656  FIXME("%p %p\n", This, ServiceRestriction);
657  return E_NOTIMPL;
658 }
659 
661 {
663 
664  FIXME("%p %d %s %d\n", This, bitmask, debugstr_w(group), enable);
665  return E_NOTIMPL;
666 }
667 
669 {
671 
672  FIXME("%p %d %s %p\n", This, bitmask, debugstr_w(group), enabled);
673  return E_NOTIMPL;
674 }
675 
677 {
679 
680  FIXME("%p\n", This);
681  return E_NOTIMPL;
682 }
683 
685 {
687 
688  FIXME("%p %d %p\n", This, profileType, action);
689  return E_NOTIMPL;
690 }
691 
693 {
695 
696  FIXME("%p %d %d\n", This, profileType, action);
697  return E_NOTIMPL;
698 }
699 
701 {
703 
704  FIXME("%p %d %p\n", This, profileType, action);
705  return E_NOTIMPL;
706 }
707 
709 {
711 
712  FIXME("%p %d %d\n", This, profileType, action);
713  return E_NOTIMPL;
714 }
715 
717 {
719 
720  FIXME("%p %s %p\n", This, debugstr_w(group), enabled);
721  return E_NOTIMPL;
722 }
723 
725 {
727 
728  FIXME("%p %p\n", This, modifyState);
729  return E_NOTIMPL;
730 }
731 
732 static const struct INetFwPolicy2Vtbl fw_policy2_vtbl =
733 {
763 };
764 
766 {
767  fw_policy2 *fp;
768 
769  TRACE("(%p,%p)\n", outer, obj);
770 
771  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
772  if (!fp) return E_OUTOFMEMORY;
773 
774  fp->INetFwPolicy2_iface.lpVtbl = &fw_policy2_vtbl;
775  fp->refs = 1;
776 
777  *obj = &fp->INetFwPolicy2_iface;
778 
780  {
781  HeapFree( GetProcessHeap(), 0, fp );
782  return E_OUTOFMEMORY;
783  }
784 
785  TRACE("returning iface %p\n", *obj);
786  return S_OK;
787 }
static unsigned int block
Definition: xmlmemory.c:118
static fw_policy2 * impl_from_INetFwPolicy2(INetFwPolicy2 *iface)
Definition: policy.c:53
static HRESULT WINAPI fwpolicy2_get_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:700
static HRESULT WINAPI netfw_rules_QueryInterface(INetFwRules *iface, REFIID riid, void **object)
Definition: policy.c:69
INetFwRules * fw_policy2_rules
Definition: policy.c:49
#define REFIID
Definition: guiddef.h:118
static HRESULT WINAPI fwpolicy2_IsRuleGroupEnabled(INetFwPolicy2 *iface, LONG bitmask, BSTR group, VARIANT_BOOL *enabled)
Definition: policy.c:668
#define E_NOINTERFACE
Definition: winerror.h:2364
struct fw_policy fw_policy
static HRESULT WINAPI fwpolicy2_get_ServiceRestriction(INetFwPolicy2 *iface, INetFwServiceRestriction **ServiceRestriction)
Definition: policy.c:652
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI fw_policy_get_CurrentProfile(INetFwPolicy *iface, INetFwProfile **profile)
Definition: policy.c:398
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI fwpolicy2_QueryInterface(INetFwPolicy2 *iface, REFIID riid, void **out)
Definition: policy.c:450
HRESULT NetFwProfile_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
Definition: profile.c:331
static fw_policy * impl_from_INetFwPolicy(INetFwPolicy *iface)
Definition: policy.c:41
static HRESULT WINAPI fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *disabled)
Definition: policy.c:621
static HRESULT WINAPI fwpolicy2_get_CurrentProfileTypes(INetFwPolicy2 *iface, LONG *profile)
Definition: policy.c:550
static HRESULT WINAPI netfw_rules_Remove(INetFwRules *iface, BSTR name)
Definition: policy.c:211
enum NET_FW_PROFILE_TYPE2_ NET_FW_PROFILE_TYPE2
DWORD LCID
Definition: nls.h:13
OLECHAR * BSTR
Definition: compat.h:1934
static HRESULT WINAPI fw_policy_GetTypeInfo(INetFwPolicy *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:335
static const struct INetFwRulesVtbl fw_rules_vtbl
Definition: policy.c:246
static HRESULT WINAPI fwpolicy2_get_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *block)
Definition: policy.c:589
static LPOLESTR
Definition: stg_prop.c:27
static HRESULT WINAPI fwpolicy2_put_ExcludedInterfaces(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT interfaces)
Definition: policy.c:582
static HRESULT WINAPI netfw_rules_Invoke(INetFwRules *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: policy.c:159
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
short VARIANT_BOOL
Definition: compat.h:1931
LONG refs
Definition: policy.c:50
static HRESULT WINAPI fwpolicy2_put_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL block)
Definition: policy.c:597
static HRESULT WINAPI fwpolicy2_GetTypeInfo(INetFwPolicy2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **info)
Definition: policy.c:504
static HRESULT WINAPI fwpolicy2_put_FirewallEnabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL enabled)
Definition: policy.c:566
INetFwRules INetFwRules_iface
Definition: policy.c:60
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI fwpolicy2_get_NotificationsDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *disabled)
Definition: policy.c:605
long LONG
Definition: pedump.c:60
struct fw_rules fw_rules
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static HRESULT WINAPI fwpolicy2_get_ExcludedInterfaces(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT *interfaces)
Definition: policy.c:574
static HRESULT WINAPI fwpolicy2_put_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:692
static ULONG WINAPI netfw_rules_AddRef(INetFwRules *iface)
Definition: policy.c:93
smooth NULL
Definition: ftsmooth.c:416
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static HRESULT WINAPI netfw_rules_get__NewEnum(INetFwRules *iface, IUnknown **newEnum)
Definition: policy.c:232
static HRESULT WINAPI fw_policy_GetIDsOfNames(INetFwPolicy *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:347
#define debugstr_guid
Definition: kernel32.h:35
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static HRESULT WINAPI fw_policy_QueryInterface(INetFwPolicy *iface, REFIID riid, void **ppvObject)
Definition: policy.c:300
GLboolean GLuint group
Definition: glext.h:11120
static HRESULT WINAPI fw_policy_Invoke(INetFwPolicy *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: policy.c:370
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static HRESULT WINAPI fwpolicy2_get_FirewallEnabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *enabled)
Definition: policy.c:558
HRESULT NetFwPolicy2_create(IUnknown *outer, void **obj)
Definition: policy.c:765
enum NET_FW_ACTION_ NET_FW_ACTION
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
static HRESULT WINAPI netfw_rules_Item(INetFwRules *iface, BSTR name, INetFwRule **rule)
Definition: policy.c:221
#define WINAPI
Definition: msvc.h:8
static HRESULT WINAPI fw_policy_GetProfileByType(INetFwPolicy *iface, NET_FW_PROFILE_TYPE profileType, INetFwProfile **profile)
Definition: policy.c:408
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
static HRESULT WINAPI fwpolicy2_EnableRuleGroup(INetFwPolicy2 *iface, LONG bitmask, BSTR group, VARIANT_BOOL enable)
Definition: policy.c:660
static HRESULT WINAPI fwpolicy2_GetTypeInfoCount(INetFwPolicy2 *iface, UINT *pctinfo)
Definition: policy.c:495
static HRESULT WINAPI fw_policy_GetTypeInfoCount(INetFwPolicy *iface, UINT *pctinfo)
Definition: policy.c:324
static HRESULT WINAPI fwpolicy2_put_NotificationsDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:613
const GUID IID_IDispatch
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg)
enum NET_FW_PROFILE_TYPE_ NET_FW_PROFILE_TYPE
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
#define InterlockedDecrement
Definition: armddk.h:52
static ULONG WINAPI fw_policy_AddRef(INetFwPolicy *iface)
Definition: policy.c:280
REFIID LPVOID * ppvObject
Definition: precomp.h:44
static HRESULT WINAPI netfw_rules_Add(INetFwRules *iface, INetFwRule *rule)
Definition: policy.c:201
static HRESULT WINAPI fwpolicy2_RestoreLocalFirewallDefaults(INetFwPolicy2 *iface)
Definition: policy.c:676
static HRESULT WINAPI fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:629
static HRESULT WINAPI fwpolicy2_get_Rules(INetFwPolicy2 *iface, INetFwRules **rules)
Definition: policy.c:637
static HRESULT WINAPI fwpolicy2_get_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:684
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
LONG refs
Definition: policy.c:38
struct stdole::EXCEPINFO EXCEPINFO
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define S_OK
Definition: intsafe.h:59
GLboolean enable
Definition: glext.h:11120
static HRESULT create_INetFwRules(INetFwRules **object)
Definition: policy.c:262
const WCHAR * action
Definition: action.c:7783
#define InterlockedIncrement
Definition: armddk.h:53
HRESULT NetFwPolicy_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: policy.c:432
static HRESULT WINAPI netfw_rules_GetIDsOfNames(INetFwRules *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:136
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI netfw_rules_GetTypeInfo(INetFwRules *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:124
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static HRESULT WINAPI netfw_rules_get_Count(INetFwRules *iface, LONG *count)
Definition: policy.c:187
struct fw_policy2 fw_policy2
enum NET_FW_MODIFY_STATE_ NET_FW_MODIFY_STATE
static ULONG WINAPI fwpolicy2_AddRef(INetFwPolicy2 *iface)
Definition: policy.c:476
LONG refs
Definition: policy.c:61
static HRESULT WINAPI fwpolicy2_GetIDsOfNames(INetFwPolicy2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:512
Definition: name.c:36
INetFwPolicy2 INetFwPolicy2_iface
Definition: policy.c:48
struct stdole::DISPPARAMS DISPPARAMS
unsigned int ULONG
Definition: retypes.h:1
#define profile
Definition: kernel32.h:12
static HRESULT WINAPI fwpolicy2_get_IsRuleGroupCurrentlyEnabled(INetFwPolicy2 *iface, BSTR group, VARIANT_BOOL *enabled)
Definition: policy.c:716
static const struct INetFwPolicyVtbl fw_policy_vtbl
Definition: policy.c:419
static HRESULT WINAPI netfw_rules_GetTypeInfoCount(INetFwRules *iface, UINT *pctinfo)
Definition: policy.c:113
static HRESULT WINAPI fwpolicy2_get_LocalPolicyModifyState(INetFwPolicy2 *iface, NET_FW_MODIFY_STATE *modifyState)
Definition: policy.c:724
#define E_POINTER
Definition: winerror.h:2365
static fw_rules * impl_from_INetFwRules(INetFwRules *iface)
Definition: policy.c:64
static ULONG WINAPI fwpolicy2_Release(INetFwPolicy2 *iface)
Definition: policy.c:482
static const struct INetFwPolicy2Vtbl fw_policy2_vtbl
Definition: policy.c:732
INetFwPolicy INetFwPolicy_iface
Definition: policy.c:37
static HRESULT WINAPI fwpolicy2_Invoke(INetFwPolicy2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: policy.c:530
static HRESULT WINAPI fwpolicy2_put_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:708
#define HeapFree(x, y, z)
Definition: compat.h:394
static ULONG WINAPI netfw_rules_Release(INetFwRules *iface)
Definition: policy.c:100
static ULONG WINAPI fw_policy_Release(INetFwPolicy *iface)
Definition: policy.c:287
#define SUCCEEDED(hr)
Definition: intsafe.h:57