ReactOS  0.4.13-dev-259-g5ca9c9c
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 "config.h"
20 #include <stdarg.h>
21 #include <stdio.h>
22 
23 #define COBJMACROS
24 
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winuser.h"
28 #include "ole2.h"
29 #include "netfw.h"
30 
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
33 #include "hnetcfg_private.h"
34 
36 
37 typedef struct fw_policy
38 {
41 } fw_policy;
42 
44 {
45  return CONTAINING_RECORD(iface, fw_policy, INetFwPolicy_iface);
46 }
47 
48 typedef struct fw_policy2
49 {
53 } fw_policy2;
54 
56 {
57  return CONTAINING_RECORD(iface, fw_policy2, INetFwPolicy2_iface);
58 }
59 
60 typedef struct fw_rules
61 {
64 } fw_rules;
65 
66 static inline fw_rules *impl_from_INetFwRules( INetFwRules *iface )
67 {
68  return CONTAINING_RECORD(iface, fw_rules, INetFwRules_iface);
69 }
70 
72  INetFwRules *iface,
73  REFIID riid,
74  void **object)
75 {
77 
78  TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
79 
80  if ( IsEqualGUID( riid, &IID_INetFwRules ) ||
83  {
84  *object = iface;
85  }
86  else
87  {
88  FIXME("interface %s not implemented\n", debugstr_guid(riid));
89  return E_NOINTERFACE;
90  }
91  INetFwRules_AddRef( iface );
92  return S_OK;
93 }
94 
96  INetFwRules *iface )
97 {
99  return InterlockedIncrement( &This->refs );
100 }
101 
103  INetFwRules *iface )
104 {
105  fw_rules *This = impl_from_INetFwRules( iface );
106  LONG refs = InterlockedDecrement( &This->refs );
107  if (!refs)
108  {
109  TRACE("destroying %p\n", This);
110  HeapFree( GetProcessHeap(), 0, This );
111  }
112  return refs;
113 }
114 
116  INetFwRules *iface,
117  UINT *pctinfo )
118 {
119  fw_rules *This = impl_from_INetFwRules( iface );
120 
121  TRACE("%p %p\n", This, pctinfo);
122  *pctinfo = 1;
123  return S_OK;
124 }
125 
127  INetFwRules *iface,
128  UINT iTInfo,
129  LCID lcid,
130  ITypeInfo **ppTInfo)
131 {
132  fw_rules *This = impl_from_INetFwRules( iface );
133 
134  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
135  return get_typeinfo( INetFwRules_tid, ppTInfo );
136 }
137 
139  INetFwRules *iface,
140  REFIID riid,
141  LPOLESTR *rgszNames,
142  UINT cNames,
143  LCID lcid,
144  DISPID *rgDispId)
145 {
146  fw_rules *This = impl_from_INetFwRules( iface );
148  HRESULT hr;
149 
150  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
151 
153  if (SUCCEEDED(hr))
154  {
155  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
156  ITypeInfo_Release( typeinfo );
157  }
158  return hr;
159 }
160 
162  INetFwRules *iface,
163  DISPID dispIdMember,
164  REFIID riid,
165  LCID lcid,
166  WORD wFlags,
167  DISPPARAMS *pDispParams,
168  VARIANT *pVarResult,
169  EXCEPINFO *pExcepInfo,
170  UINT *puArgErr)
171 {
172  fw_rules *This = impl_from_INetFwRules( iface );
174  HRESULT hr;
175 
176  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
177  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
178 
180  if (SUCCEEDED(hr))
181  {
182  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwRules_iface, dispIdMember,
183  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
184  ITypeInfo_Release( typeinfo );
185  }
186  return hr;
187 }
188 
190  INetFwRules *iface,
191  LONG *count)
192 {
193  fw_rules *This = impl_from_INetFwRules( iface );
194 
195  FIXME("%p, %p\n", This, count);
196 
197  if (count)
198  *count = 0;
199 
200  return S_OK;
201 }
202 
204  INetFwRules *iface,
205  INetFwRule *rule)
206 {
207  fw_rules *This = impl_from_INetFwRules( iface );
208 
209  FIXME("%p, %p\n", This, rule);
210  return E_NOTIMPL;
211 }
212 
214  INetFwRules *iface,
215  BSTR name)
216 {
217  fw_rules *This = impl_from_INetFwRules( iface );
218 
219  FIXME("%p, %s\n", This, debugstr_w(name));
220  return E_NOTIMPL;
221 }
222 
224  INetFwRules *iface,
225  BSTR name,
226  INetFwRule **rule)
227 {
228  fw_rules *This = impl_from_INetFwRules( iface );
229 
230  FIXME("%p, %s, %p\n", This, debugstr_w(name), rule);
231  return E_NOTIMPL;
232 }
233 
235  INetFwRules *iface,
236  IUnknown **newEnum)
237 {
238  fw_rules *This = impl_from_INetFwRules( iface );
239 
240  FIXME("%p, %p\n", This, newEnum);
241  return E_NOTIMPL;
242 }
243 
244 static const struct INetFwRulesVtbl fw_rules_vtbl =
245 {
258 };
259 
261 {
262  fw_rules *rules;
263 
264  TRACE("(%p)\n", object);
265 
266  rules = HeapAlloc( GetProcessHeap(), 0, sizeof(*rules) );
267  if (!rules) return E_OUTOFMEMORY;
268 
269  rules->INetFwRules_iface.lpVtbl = &fw_rules_vtbl;
270  rules->refs = 1;
271 
272  *object = &rules->INetFwRules_iface;
273 
274  TRACE("returning iface %p\n", *object);
275  return S_OK;
276 }
277 
279  INetFwPolicy *iface )
280 {
282  return InterlockedIncrement( &fw_policy->refs );
283 }
284 
286  INetFwPolicy *iface )
287 {
290  if (!refs)
291  {
292  TRACE("destroying %p\n", fw_policy);
294  }
295  return refs;
296 }
297 
299  INetFwPolicy *iface,
300  REFIID riid,
301  void **ppvObject )
302 {
304 
305  TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
306 
307  if ( IsEqualGUID( riid, &IID_INetFwPolicy ) ||
310  {
311  *ppvObject = iface;
312  }
313  else
314  {
315  FIXME("interface %s not implemented\n", debugstr_guid(riid));
316  return E_NOINTERFACE;
317  }
318  INetFwPolicy_AddRef( iface );
319  return S_OK;
320 }
321 
323  INetFwPolicy *iface,
324  UINT *pctinfo )
325 {
327 
328  TRACE("%p %p\n", This, pctinfo);
329  *pctinfo = 1;
330  return S_OK;
331 }
332 
334  INetFwPolicy *iface,
335  UINT iTInfo,
336  LCID lcid,
337  ITypeInfo **ppTInfo )
338 {
340 
341  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
342  return get_typeinfo( INetFwPolicy_tid, ppTInfo );
343 }
344 
346  INetFwPolicy *iface,
347  REFIID riid,
348  LPOLESTR *rgszNames,
349  UINT cNames,
350  LCID lcid,
351  DISPID *rgDispId )
352 {
355  HRESULT hr;
356 
357  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
358 
360  if (SUCCEEDED(hr))
361  {
362  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
363  ITypeInfo_Release( typeinfo );
364  }
365  return hr;
366 }
367 
369  INetFwPolicy *iface,
370  DISPID dispIdMember,
371  REFIID riid,
372  LCID lcid,
373  WORD wFlags,
374  DISPPARAMS *pDispParams,
375  VARIANT *pVarResult,
376  EXCEPINFO *pExcepInfo,
377  UINT *puArgErr )
378 {
381  HRESULT hr;
382 
383  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
384  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
385 
387  if (SUCCEEDED(hr))
388  {
389  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy_iface, dispIdMember,
390  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
391  ITypeInfo_Release( typeinfo );
392  }
393  return hr;
394 }
395 
397  INetFwPolicy *iface,
399 {
401 
402  TRACE("%p, %p\n", This, profile);
403  return NetFwProfile_create( NULL, (void **)profile );
404 }
405 
407  INetFwPolicy *iface,
408  NET_FW_PROFILE_TYPE profileType,
410 {
412 
413  FIXME("%p, %u, %p\n", This, profileType, profile);
414  return E_NOTIMPL;
415 }
416 
417 static const struct INetFwPolicyVtbl fw_policy_vtbl =
418 {
428 };
429 
431 {
432  fw_policy *fp;
433 
434  TRACE("(%p,%p)\n", pUnkOuter, ppObj);
435 
436  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
437  if (!fp) return E_OUTOFMEMORY;
438 
439  fp->INetFwPolicy_iface.lpVtbl = &fw_policy_vtbl;
440  fp->refs = 1;
441 
442  *ppObj = &fp->INetFwPolicy_iface;
443 
444  TRACE("returning iface %p\n", *ppObj);
445  return S_OK;
446 }
447 
449 {
451 
452  TRACE("%p %s %p\n", This, debugstr_guid( riid ), out );
453 
454  if ( IsEqualGUID( riid, &IID_INetFwPolicy2 ) ||
457  {
458  *out = iface;
459  }
460  else if( IsEqualGUID( riid, &IID_INetFwRules ) )
461  {
462  TRACE("INetFwRules not supported\n");
463  return E_NOINTERFACE;
464  }
465  else
466  {
467  FIXME("interface %s not implemented\n", debugstr_guid(riid));
468  return E_NOINTERFACE;
469  }
470  INetFwPolicy2_AddRef( iface );
471  return S_OK;
472 }
473 
475 {
477  return InterlockedIncrement( &fw_policy->refs );
478 }
479 
481 {
484  if (!refs)
485  {
486  INetFwRules_Release(fw_policy->fw_policy2_rules);
487  TRACE("destroying %p\n", fw_policy);
489  }
490  return refs;
491 }
492 
494 {
496 
497  TRACE("%p %p\n", This, pctinfo);
498  *pctinfo = 1;
499  return S_OK;
500 }
501 
503 {
505 
506  TRACE("%p %u %u %p\n", This, iTInfo, lcid, info);
508 }
509 
511  UINT cNames, LCID lcid, DISPID *rgDispId)
512 {
515  HRESULT hr;
516 
517  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
518 
520  if (SUCCEEDED(hr))
521  {
522  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
523  ITypeInfo_Release( typeinfo );
524  }
525  return hr;
526 }
527 
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)
530 {
533  HRESULT hr;
534 
535  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
536  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
537 
539  if (SUCCEEDED(hr))
540  {
541  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy2_iface, dispIdMember,
542  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
543  ITypeInfo_Release( typeinfo );
544  }
545  return hr;
546 }
547 
549 {
551 
552  FIXME("%p %p\n", This, profile);
553  return E_NOTIMPL;
554 }
555 
557 {
559 
560  FIXME("%p %d %p\n", This, profileType, enabled);
561  return E_NOTIMPL;
562 }
563 
565 {
567 
568  FIXME("%p %d %d\n", This, profileType, enabled);
569  return E_NOTIMPL;
570 }
571 
573 {
575 
576  FIXME("%p %d %p\n", This, profileType, interfaces);
577  return E_NOTIMPL;
578 }
579 
581 {
583  FIXME("%p %d\n", This, profileType);
584  return E_NOTIMPL;
585 }
586 
588 {
590 
591  FIXME("%p %d %p\n", This, profileType, block);
592  return E_NOTIMPL;
593 }
594 
596 {
598 
599  FIXME("%p %d %d\n", This, profileType, block);
600  return E_NOTIMPL;
601 }
602 
604 {
606 
607  FIXME("%p %d %p\n", This, profileType, disabled);
608  return E_NOTIMPL;
609 }
610 
612 {
614 
615  FIXME("%p %d %d\n", This, profileType, disabled);
616  return E_NOTIMPL;
617 }
618 
620 {
622 
623  FIXME("%p %d %p\n", This, profileType, disabled);
624  return E_NOTIMPL;
625 }
626 
628 {
630 
631  FIXME("%p %d %d\n", This, profileType, disabled);
632  return E_NOTIMPL;
633 }
634 
636 {
638 
639  TRACE("%p %p\n", This, rules);
640 
641  if(!rules)
642  return E_POINTER;
643 
644  if(rules)
645  {
646  *rules = This->fw_policy2_rules;
647  INetFwRules_AddRef(This->fw_policy2_rules);
648  }
649 
650  return S_OK;
651 }
652 
654 {
656 
657  FIXME("%p %p\n", This, ServiceRestriction);
658  return E_NOTIMPL;
659 }
660 
662 {
664 
665  FIXME("%p %d %s %d\n", This, bitmask, debugstr_w(group), enable);
666  return E_NOTIMPL;
667 }
668 
670 {
672 
673  FIXME("%p %d %s %p\n", This, bitmask, debugstr_w(group), enabled);
674  return E_NOTIMPL;
675 }
676 
678 {
680 
681  FIXME("%p\n", This);
682  return E_NOTIMPL;
683 }
684 
686 {
688 
689  FIXME("%p %d %p\n", This, profileType, action);
690  return E_NOTIMPL;
691 }
692 
694 {
696 
697  FIXME("%p %d %d\n", This, profileType, action);
698  return E_NOTIMPL;
699 }
700 
702 {
704 
705  FIXME("%p %d %p\n", This, profileType, action);
706  return E_NOTIMPL;
707 }
708 
710 {
712 
713  FIXME("%p %d %d\n", This, profileType, action);
714  return E_NOTIMPL;
715 }
716 
718 {
720 
721  FIXME("%p %s %p\n", This, debugstr_w(group), enabled);
722  return E_NOTIMPL;
723 }
724 
726 {
728 
729  FIXME("%p %p\n", This, modifyState);
730  return E_NOTIMPL;
731 }
732 
733 static const struct INetFwPolicy2Vtbl fw_policy2_vtbl =
734 {
764 };
765 
767 {
768  fw_policy2 *fp;
769 
770  TRACE("(%p,%p)\n", outer, obj);
771 
772  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
773  if (!fp) return E_OUTOFMEMORY;
774 
775  fp->INetFwPolicy2_iface.lpVtbl = &fw_policy2_vtbl;
776  fp->refs = 1;
777 
778  *obj = &fp->INetFwPolicy2_iface;
779 
781  {
782  HeapFree( GetProcessHeap(), 0, fp );
783  return E_OUTOFMEMORY;
784  }
785 
786  TRACE("returning iface %p\n", *obj);
787  return S_OK;
788 }
static unsigned int block
Definition: xmlmemory.c:118
static fw_policy2 * impl_from_INetFwPolicy2(INetFwPolicy2 *iface)
Definition: policy.c:55
static HRESULT WINAPI fwpolicy2_get_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:701
static HRESULT WINAPI netfw_rules_QueryInterface(INetFwRules *iface, REFIID riid, void **object)
Definition: policy.c:71
INetFwRules * fw_policy2_rules
Definition: policy.c:51
#define REFIID
Definition: guiddef.h:113
static HRESULT WINAPI fwpolicy2_IsRuleGroupEnabled(INetFwPolicy2 *iface, LONG bitmask, BSTR group, VARIANT_BOOL *enabled)
Definition: policy.c:669
#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:653
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:396
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI fwpolicy2_QueryInterface(INetFwPolicy2 *iface, REFIID riid, void **out)
Definition: policy.c:448
HRESULT NetFwProfile_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
Definition: profile.c:333
static fw_policy * impl_from_INetFwPolicy(INetFwPolicy *iface)
Definition: policy.c:43
static HRESULT WINAPI fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *disabled)
Definition: policy.c:619
static HRESULT WINAPI fwpolicy2_get_CurrentProfileTypes(INetFwPolicy2 *iface, LONG *profile)
Definition: policy.c:548
static HRESULT WINAPI netfw_rules_Remove(INetFwRules *iface, BSTR name)
Definition: policy.c:213
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:333
static const struct INetFwRulesVtbl fw_rules_vtbl
Definition: policy.c:244
static HRESULT WINAPI fwpolicy2_get_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *block)
Definition: policy.c:587
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:580
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:161
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
short VARIANT_BOOL
Definition: compat.h:1931
LONG refs
Definition: policy.c:52
static HRESULT WINAPI fwpolicy2_put_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL block)
Definition: policy.c:595
static HRESULT WINAPI fwpolicy2_GetTypeInfo(INetFwPolicy2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **info)
Definition: policy.c:502
static HRESULT WINAPI fwpolicy2_put_FirewallEnabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL enabled)
Definition: policy.c:564
INetFwRules INetFwRules_iface
Definition: policy.c:62
#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:603
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:572
static HRESULT WINAPI fwpolicy2_put_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:693
static ULONG WINAPI netfw_rules_AddRef(INetFwRules *iface)
Definition: policy.c:95
smooth NULL
Definition: ftsmooth.c:416
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:120
static HRESULT WINAPI netfw_rules_get__NewEnum(INetFwRules *iface, IUnknown **newEnum)
Definition: policy.c:234
static HRESULT WINAPI fw_policy_GetIDsOfNames(INetFwPolicy *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:345
#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:298
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:368
#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:556
HRESULT NetFwPolicy2_create(IUnknown *outer, void **obj)
Definition: policy.c:766
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:223
#define WINAPI
Definition: msvc.h:8
static HRESULT WINAPI fw_policy_GetProfileByType(INetFwPolicy *iface, NET_FW_PROFILE_TYPE profileType, INetFwProfile **profile)
Definition: policy.c:406
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:661
static HRESULT WINAPI fwpolicy2_GetTypeInfoCount(INetFwPolicy2 *iface, UINT *pctinfo)
Definition: policy.c:493
static HRESULT WINAPI fw_policy_GetTypeInfoCount(INetFwPolicy *iface, UINT *pctinfo)
Definition: policy.c:322
static HRESULT WINAPI fwpolicy2_put_NotificationsDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:611
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:106
#define InterlockedDecrement
Definition: armddk.h:52
static ULONG WINAPI fw_policy_AddRef(INetFwPolicy *iface)
Definition: policy.c:278
REFIID LPVOID * ppvObject
Definition: precomp.h:44
static HRESULT WINAPI netfw_rules_Add(INetFwRules *iface, INetFwRule *rule)
Definition: policy.c:203
static HRESULT WINAPI fwpolicy2_RestoreLocalFirewallDefaults(INetFwPolicy2 *iface)
Definition: policy.c:677
static HRESULT WINAPI fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:627
static HRESULT WINAPI fwpolicy2_get_Rules(INetFwPolicy2 *iface, INetFwRules **rules)
Definition: policy.c:635
static HRESULT WINAPI fwpolicy2_get_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:685
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
LONG refs
Definition: policy.c:40
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:260
const WCHAR * action
Definition: action.c:7783
#define InterlockedIncrement
Definition: armddk.h:53
HRESULT NetFwPolicy_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: policy.c:430
static HRESULT WINAPI netfw_rules_GetIDsOfNames(INetFwRules *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:138
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI netfw_rules_GetTypeInfo(INetFwRules *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:126
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:189
struct fw_policy2 fw_policy2
enum NET_FW_MODIFY_STATE_ NET_FW_MODIFY_STATE
static ULONG WINAPI fwpolicy2_AddRef(INetFwPolicy2 *iface)
Definition: policy.c:474
LONG refs
Definition: policy.c:63
static HRESULT WINAPI fwpolicy2_GetIDsOfNames(INetFwPolicy2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:510
Definition: name.c:36
INetFwPolicy2 INetFwPolicy2_iface
Definition: policy.c:50
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:717
static const struct INetFwPolicyVtbl fw_policy_vtbl
Definition: policy.c:417
static HRESULT WINAPI netfw_rules_GetTypeInfoCount(INetFwRules *iface, UINT *pctinfo)
Definition: policy.c:115
static HRESULT WINAPI fwpolicy2_get_LocalPolicyModifyState(INetFwPolicy2 *iface, NET_FW_MODIFY_STATE *modifyState)
Definition: policy.c:725
#define E_POINTER
Definition: winerror.h:2365
static fw_rules * impl_from_INetFwRules(INetFwRules *iface)
Definition: policy.c:66
static ULONG WINAPI fwpolicy2_Release(INetFwPolicy2 *iface)
Definition: policy.c:480
static const struct INetFwPolicy2Vtbl fw_policy2_vtbl
Definition: policy.c:733
INetFwPolicy INetFwPolicy_iface
Definition: policy.c:39
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:528
static HRESULT WINAPI fwpolicy2_put_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:709
#define HeapFree(x, y, z)
Definition: compat.h:394
static ULONG WINAPI netfw_rules_Release(INetFwRules *iface)
Definition: policy.c:102
static ULONG WINAPI fw_policy_Release(INetFwPolicy *iface)
Definition: policy.c:285
#define SUCCEEDED(hr)
Definition: intsafe.h:57