ReactOS 0.4.17-dev-966-gf06eace
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
35typedef struct fw_policy
36{
40
42{
43 return CONTAINING_RECORD(iface, fw_policy, INetFwPolicy_iface);
44}
45
46typedef struct fw_policy2
47{
52
54{
55 return CONTAINING_RECORD(iface, fw_policy2, INetFwPolicy2_iface);
56}
57
58typedef struct fw_rule
59{
63
64static inline fw_rule *impl_from_INetFwRule( INetFwRule *iface )
65{
66 return CONTAINING_RECORD(iface, fw_rule, INetFwRule_iface);
67}
68
70 INetFwRule *iface,
72 void **object)
73{
75
76 TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
77
78 if ( IsEqualGUID( riid, &IID_INetFwRule ) ||
81 {
82 *object = iface;
83 }
84 else
85 {
86 FIXME("interface %s not implemented\n", debugstr_guid(riid));
87 return E_NOINTERFACE;
88 }
89 INetFwRule_AddRef( iface );
90 return S_OK;
91}
92
94 INetFwRule *iface )
95{
97 return InterlockedIncrement( &This->refs );
98}
99
101 INetFwRule *iface )
102{
105 if (!refs)
106 {
107 TRACE("destroying %p\n", This);
108 free( This );
109 }
110 return refs;
111}
112
114 INetFwRule *iface,
115 UINT *pctinfo )
116{
118
119 TRACE("%p %p\n", This, pctinfo);
120 *pctinfo = 1;
121 return S_OK;
122}
123
125 INetFwRule *iface,
126 UINT iTInfo,
127 LCID lcid,
128 ITypeInfo **ppTInfo)
129{
131
132 TRACE("%p %u %lu %p\n", This, iTInfo, lcid, ppTInfo);
133 return get_typeinfo( INetFwRule_tid, ppTInfo );
134}
135
137 INetFwRule *iface,
138 REFIID riid,
139 LPOLESTR *rgszNames,
140 UINT cNames,
141 LCID lcid,
142 DISPID *rgDispId)
143{
146 HRESULT hr;
147
148 TRACE("%p %s %p %u %lu %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 INetFwRule *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{
172 HRESULT hr;
173
174 TRACE("%p %ld %s %ld %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->INetFwRule_iface, dispIdMember,
181 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
182 ITypeInfo_Release( typeinfo );
183 }
184 return hr;
185}
186
188 INetFwRule *iface,
189 BSTR *name)
190{
192
193 FIXME("%p, %p\n", This, name);
194 return E_NOTIMPL;
195}
196
198 INetFwRule *iface,
199 BSTR name)
200{
202
203 FIXME("%p, %s\n", This, debugstr_w(name));
204 return S_OK;
205}
206
208 INetFwRule *iface,
209 BSTR *desc)
210{
212
213 FIXME("%p, %p\n", This, desc);
214 return E_NOTIMPL;
215}
216
218 INetFwRule *iface,
219 BSTR desc)
220{
222
223 FIXME("%p, %s\n", This, debugstr_w(desc));
224 return S_OK;
225}
226
228 INetFwRule *iface,
229 BSTR *app)
230{
232
233 FIXME("%p, %p\n", This, app);
234 return E_NOTIMPL;
235}
236
238 INetFwRule *iface,
239 BSTR app)
240{
242
243 FIXME("%p, %s\n", This, debugstr_w(app));
244 return S_OK;
245}
246
248 INetFwRule *iface,
249 BSTR *service)
250{
252
253 FIXME("%p, %p\n", This, service);
254 return E_NOTIMPL;
255}
256
258 INetFwRule *iface,
259 BSTR service)
260{
262
263 FIXME("%p, %s\n", This, debugstr_w(service));
264 return S_OK;
265}
266
268 INetFwRule *iface,
269 LONG *protocol)
270{
272
273 FIXME("%p, %p\n", This, protocol);
274 return E_NOTIMPL;
275}
276
278 INetFwRule *iface,
280{
282
283 FIXME("%p, %ld\n", This, protocol);
284 return S_OK;
285}
286
288 INetFwRule *iface,
289 BSTR *ports)
290{
292
293 FIXME("%p, %p\n", This, ports);
294 return E_NOTIMPL;
295}
296
298 INetFwRule *iface,
299 BSTR ports)
300{
302
303 FIXME("%p, %s\n", This, debugstr_w(ports));
304 return S_OK;
305}
306
308 INetFwRule *iface,
309 BSTR *ports)
310{
312
313 FIXME("%p, %p\n", This, ports);
314 return E_NOTIMPL;
315}
316
318 INetFwRule *iface,
319 BSTR ports)
320{
322
323 FIXME("%p, %s\n", This, debugstr_w(ports));
324 return S_OK;
325}
326
328 INetFwRule *iface,
329 BSTR *addresses)
330{
332
333 FIXME("%p, %p\n", This, addresses);
334 return E_NOTIMPL;
335}
336
338 INetFwRule *iface,
339 BSTR addresses)
340{
342
343 FIXME("%p, %s\n", This, debugstr_w(addresses));
344 return S_OK;
345}
346
348 INetFwRule *iface,
349 BSTR *addresses)
350{
352
353 FIXME("%p, %p\n", This, addresses);
354 return E_NOTIMPL;
355}
356
358 INetFwRule *iface,
359 BSTR addresses)
360{
362
363 FIXME("%p, %s\n", This, debugstr_w(addresses));
364 return S_OK;
365}
366
368 INetFwRule *iface,
369 BSTR *codes)
370{
372
373 FIXME("%p, %p\n", This, codes);
374 return E_NOTIMPL;
375}
376
378 INetFwRule *iface,
379 BSTR codes)
380{
382
383 FIXME("%p, %s\n", This, debugstr_w(codes));
384 return S_OK;
385}
386
388 INetFwRule *iface,
390{
392
393 FIXME("%p, %p\n", This, dir);
394 return E_NOTIMPL;
395}
396
398 INetFwRule *iface,
400{
402
403 FIXME("%p, %u\n", This, dir);
404 return S_OK;
405}
406
408 INetFwRule *iface,
409 VARIANT *interfaces)
410{
412
413 FIXME("%p, %p\n", This, interfaces);
414 return E_NOTIMPL;
415}
416
418 INetFwRule *iface,
419 VARIANT interfaces)
420{
422
423 FIXME("%p, %s\n", This, debugstr_variant(&interfaces));
424 return S_OK;
425}
426
428 INetFwRule *iface,
429 BSTR *types)
430{
432
433 FIXME("%p, %p\n", This, types);
434 return E_NOTIMPL;
435}
436
438 INetFwRule *iface,
439 BSTR types)
440{
442
443 FIXME("%p, %s\n", This, debugstr_w(types));
444 return S_OK;
445}
446
448 INetFwRule *iface,
450{
452
453 FIXME("%p, %p\n", This, enabled);
454 return E_NOTIMPL;
455}
456
458 INetFwRule *iface,
460{
462
463 FIXME("%p, %#x\n", This, enabled);
464 return S_OK;
465}
466
468 INetFwRule *iface,
469 BSTR *grouping)
470{
472
473 FIXME("%p, %p\n", This, grouping);
474 return E_NOTIMPL;
475}
476
478 INetFwRule *iface,
479 BSTR grouping)
480{
482
483 FIXME("%p, %s\n", This, debugstr_w(grouping));
484 return S_OK;
485}
486
488 INetFwRule *iface,
489 LONG *profiles)
490{
492
493 FIXME("%p, %p\n", This, profiles);
494 return E_NOTIMPL;
495}
496
498 INetFwRule *iface,
499 LONG profiles)
500{
502
503 FIXME("%p, %#lx\n", This, profiles);
504 return S_OK;
505}
506
508 INetFwRule *iface,
510{
512
513 FIXME("%p, %p\n", This, enabled);
514 return E_NOTIMPL;
515}
516
518 INetFwRule *iface,
520{
522
523 FIXME("%p, %#x\n", This, enabled);
524 return S_OK;
525}
526
528 INetFwRule *iface,
530{
532
533 FIXME("%p, %p\n", This, action);
534 return E_NOTIMPL;
535}
536
538 INetFwRule *iface,
540{
542
543 FIXME("%p, %u\n", This, action);
544 return S_OK;
545}
546
547static const struct INetFwRuleVtbl fw_rule_vtbl =
548{
592};
593
595{
596 fw_rule *rule;
597
598 TRACE("(%p)\n", obj);
599
600 rule = malloc( sizeof(*rule) );
601 if (!rule) return E_OUTOFMEMORY;
602
603 rule->INetFwRule_iface.lpVtbl = &fw_rule_vtbl;
604 rule->refs = 1;
605
606 *obj = &rule->INetFwRule_iface;
607
608 TRACE("returning iface %p\n", *obj);
609 return S_OK;
610}
611
612typedef struct fw_rules
613{
617
619{
620 return CONTAINING_RECORD(iface, fw_rules, INetFwRules_iface);
621}
622
624 INetFwRules *iface,
625 REFIID riid,
626 void **object)
627{
629
630 TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
631
632 if ( IsEqualGUID( riid, &IID_INetFwRules ) ||
635 {
636 *object = iface;
637 }
638 else
639 {
640 FIXME("interface %s not implemented\n", debugstr_guid(riid));
641 return E_NOINTERFACE;
642 }
643 INetFwRules_AddRef( iface );
644 return S_OK;
645}
646
648 INetFwRules *iface )
649{
651 return InterlockedIncrement( &This->refs );
652}
653
655 INetFwRules *iface )
656{
659 if (!refs)
660 {
661 TRACE("destroying %p\n", This);
662 free( This );
663 }
664 return refs;
665}
666
668 INetFwRules *iface,
669 UINT *pctinfo )
670{
672
673 TRACE("%p %p\n", This, pctinfo);
674 *pctinfo = 1;
675 return S_OK;
676}
677
679 INetFwRules *iface,
680 UINT iTInfo,
681 LCID lcid,
682 ITypeInfo **ppTInfo)
683{
685
686 TRACE("%p %u %lu %p\n", This, iTInfo, lcid, ppTInfo);
687 return get_typeinfo( INetFwRules_tid, ppTInfo );
688}
689
691 INetFwRules *iface,
692 REFIID riid,
693 LPOLESTR *rgszNames,
694 UINT cNames,
695 LCID lcid,
696 DISPID *rgDispId)
697{
700 HRESULT hr;
701
702 TRACE("%p %s %p %u %lu %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
703
705 if (SUCCEEDED(hr))
706 {
707 hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
708 ITypeInfo_Release( typeinfo );
709 }
710 return hr;
711}
712
714 INetFwRules *iface,
715 DISPID dispIdMember,
716 REFIID riid,
717 LCID lcid,
718 WORD wFlags,
719 DISPPARAMS *pDispParams,
720 VARIANT *pVarResult,
721 EXCEPINFO *pExcepInfo,
722 UINT *puArgErr)
723{
726 HRESULT hr;
727
728 TRACE("%p %ld %s %ld %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
729 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
730
732 if (SUCCEEDED(hr))
733 {
734 hr = ITypeInfo_Invoke( typeinfo, &This->INetFwRules_iface, dispIdMember,
735 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
736 ITypeInfo_Release( typeinfo );
737 }
738 return hr;
739}
740
742 INetFwRules *iface,
743 LONG *count)
744{
746
747 FIXME("%p, %p\n", This, count);
748
749 if (count)
750 *count = 0;
751
752 return S_OK;
753}
754
756 INetFwRules *iface,
757 INetFwRule *rule)
758{
760
761 FIXME("%p, %p\n", This, rule);
762 return S_OK;
763}
764
766 INetFwRules *iface,
767 BSTR name)
768{
770
771 FIXME("%p, %s\n", This, debugstr_w(name));
772 return S_OK;
773}
774
776 INetFwRules *iface,
777 BSTR name,
778 INetFwRule **rule)
779{
781
782 FIXME("%p, %s, %p\n", This, debugstr_w(name), rule);
783 return E_NOTIMPL;
784}
785
787 INetFwRules *iface,
788 IUnknown **newEnum)
789{
791
792 FIXME("%p, %p\n", This, newEnum);
793
794 if (!newEnum) return E_POINTER;
795 *newEnum = NULL;
796
797 return E_NOTIMPL;
798}
799
800static const struct INetFwRulesVtbl fw_rules_vtbl =
801{
814};
815
817{
818 fw_rules *rules;
819
820 TRACE("(%p)\n", object);
821
822 rules = malloc( sizeof(*rules) );
823 if (!rules) return E_OUTOFMEMORY;
824
825 rules->INetFwRules_iface.lpVtbl = &fw_rules_vtbl;
826 rules->refs = 1;
827
828 *object = &rules->INetFwRules_iface;
829
830 TRACE("returning iface %p\n", *object);
831 return S_OK;
832}
833
835 INetFwPolicy *iface )
836{
839}
840
842 INetFwPolicy *iface )
843{
846 if (!refs)
847 {
848 TRACE("destroying %p\n", fw_policy);
849 free( fw_policy );
850 }
851 return refs;
852}
853
855 INetFwPolicy *iface,
856 REFIID riid,
857 void **ppvObject )
858{
860
861 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
862
863 if ( IsEqualGUID( riid, &IID_INetFwPolicy ) ||
866 {
867 *ppvObject = iface;
868 }
869 else
870 {
871 FIXME("interface %s not implemented\n", debugstr_guid(riid));
872 return E_NOINTERFACE;
873 }
874 INetFwPolicy_AddRef( iface );
875 return S_OK;
876}
877
879 INetFwPolicy *iface,
880 UINT *pctinfo )
881{
883
884 TRACE("%p %p\n", This, pctinfo);
885 *pctinfo = 1;
886 return S_OK;
887}
888
890 INetFwPolicy *iface,
891 UINT iTInfo,
892 LCID lcid,
893 ITypeInfo **ppTInfo )
894{
896
897 TRACE("%p %u %lu %p\n", This, iTInfo, lcid, ppTInfo);
898 return get_typeinfo( INetFwPolicy_tid, ppTInfo );
899}
900
902 INetFwPolicy *iface,
903 REFIID riid,
904 LPOLESTR *rgszNames,
905 UINT cNames,
906 LCID lcid,
907 DISPID *rgDispId )
908{
911 HRESULT hr;
912
913 TRACE("%p %s %p %u %lu %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
914
916 if (SUCCEEDED(hr))
917 {
918 hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
919 ITypeInfo_Release( typeinfo );
920 }
921 return hr;
922}
923
925 INetFwPolicy *iface,
926 DISPID dispIdMember,
927 REFIID riid,
928 LCID lcid,
929 WORD wFlags,
930 DISPPARAMS *pDispParams,
931 VARIANT *pVarResult,
932 EXCEPINFO *pExcepInfo,
933 UINT *puArgErr )
934{
937 HRESULT hr;
938
939 TRACE("%p %ld %s %ld %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
940 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
941
943 if (SUCCEEDED(hr))
944 {
945 hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy_iface, dispIdMember,
946 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
947 ITypeInfo_Release( typeinfo );
948 }
949 return hr;
950}
951
953 INetFwPolicy *iface,
955{
957
958 TRACE("%p, %p\n", This, profile);
959 return NetFwProfile_create( NULL, (void **)profile );
960}
961
963 INetFwPolicy *iface,
964 NET_FW_PROFILE_TYPE profileType,
966{
968
969 FIXME("%p, %u, %p\n", This, profileType, profile);
970 return E_NOTIMPL;
971}
972
973static const struct INetFwPolicyVtbl fw_policy_vtbl =
974{
984};
985
987{
988 fw_policy *fp;
989
990 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
991
992 fp = malloc( sizeof(*fp) );
993 if (!fp) return E_OUTOFMEMORY;
994
996 fp->refs = 1;
997
998 *ppObj = &fp->INetFwPolicy_iface;
999
1000 TRACE("returning iface %p\n", *ppObj);
1001 return S_OK;
1002}
1003
1005{
1007
1008 TRACE("%p %s %p\n", This, debugstr_guid( riid ), out );
1009
1010 if ( IsEqualGUID( riid, &IID_INetFwPolicy2 ) ||
1013 {
1014 *out = iface;
1015 }
1016 else if( IsEqualGUID( riid, &IID_INetFwRules ) )
1017 {
1018 TRACE("INetFwRules not supported\n");
1019 return E_NOINTERFACE;
1020 }
1021 else
1022 {
1023 FIXME("interface %s not implemented\n", debugstr_guid(riid));
1024 return E_NOINTERFACE;
1025 }
1026 INetFwPolicy2_AddRef( iface );
1027 return S_OK;
1028}
1029
1031{
1034}
1035
1037{
1040 if (!refs)
1041 {
1042 INetFwRules_Release(fw_policy->fw_policy2_rules);
1043 TRACE("destroying %p\n", fw_policy);
1044 free( fw_policy );
1045 }
1046 return refs;
1047}
1048
1050{
1052
1053 TRACE("%p %p\n", This, pctinfo);
1054 *pctinfo = 1;
1055 return S_OK;
1056}
1057
1059{
1061
1062 TRACE("%p %u %lu %p\n", This, iTInfo, lcid, info);
1064}
1065
1067 UINT cNames, LCID lcid, DISPID *rgDispId)
1068{
1071 HRESULT hr;
1072
1073 TRACE("%p %s %p %u %lu %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
1074
1076 if (SUCCEEDED(hr))
1077 {
1078 hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
1079 ITypeInfo_Release( typeinfo );
1080 }
1081 return hr;
1082}
1083
1085 WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1086{
1089 HRESULT hr;
1090
1091 TRACE("%p %ld %s %ld %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
1092 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1093
1095 if (SUCCEEDED(hr))
1096 {
1097 hr = ITypeInfo_Invoke( typeinfo, &This->INetFwPolicy2_iface, dispIdMember,
1098 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
1099 ITypeInfo_Release( typeinfo );
1100 }
1101 return hr;
1102}
1103
1105{
1107
1108 FIXME("%p %p\n", This, profile);
1109 return E_NOTIMPL;
1110}
1111
1113{
1115
1116 FIXME("%p %d %p\n", This, profileType, enabled);
1117 return E_NOTIMPL;
1118}
1119
1121{
1123
1124 FIXME("%p %d %d\n", This, profileType, enabled);
1125 return E_NOTIMPL;
1126}
1127
1129{
1131
1132 FIXME("%p %d %p\n", This, profileType, interfaces);
1133 return E_NOTIMPL;
1134}
1135
1137{
1139 FIXME("%p %d\n", This, profileType);
1140 return E_NOTIMPL;
1141}
1142
1144{
1146
1147 FIXME("%p %d %p\n", This, profileType, block);
1148 return E_NOTIMPL;
1149}
1150
1152{
1154
1155 FIXME("%p %d %d\n", This, profileType, block);
1156 return E_NOTIMPL;
1157}
1158
1160{
1162
1163 FIXME("%p %d %p\n", This, profileType, disabled);
1164 return E_NOTIMPL;
1165}
1166
1168{
1170
1171 FIXME("%p %d %d\n", This, profileType, disabled);
1172 return E_NOTIMPL;
1173}
1174
1176{
1178
1179 FIXME("%p %d %p\n", This, profileType, disabled);
1180 return E_NOTIMPL;
1181}
1182
1184{
1186
1187 FIXME("%p %d %d\n", This, profileType, disabled);
1188 return E_NOTIMPL;
1189}
1190
1192{
1194
1195 TRACE("%p %p\n", This, rules);
1196
1197 if(!rules)
1198 return E_POINTER;
1199
1200 *rules = This->fw_policy2_rules;
1201 INetFwRules_AddRef(This->fw_policy2_rules);
1202
1203 return S_OK;
1204}
1205
1207{
1209
1210 FIXME("%p %p\n", This, ServiceRestriction);
1211 return E_NOTIMPL;
1212}
1213
1215{
1217
1218 FIXME("%p %ld %s %d\n", This, bitmask, debugstr_w(group), enable);
1219 return E_NOTIMPL;
1220}
1221
1223{
1225
1226 FIXME("%p %ld %s %p\n", This, bitmask, debugstr_w(group), enabled);
1227 return E_NOTIMPL;
1228}
1229
1231{
1233
1234 FIXME("%p\n", This);
1235 return E_NOTIMPL;
1236}
1237
1239{
1241
1242 FIXME("%p %d %p\n", This, profileType, action);
1243 return E_NOTIMPL;
1244}
1245
1247{
1249
1250 FIXME("%p %d %d\n", This, profileType, action);
1251 return E_NOTIMPL;
1252}
1253
1255{
1257
1258 FIXME("%p %d %p\n", This, profileType, action);
1259 return E_NOTIMPL;
1260}
1261
1263{
1265
1266 FIXME("%p %d %d\n", This, profileType, action);
1267 return E_NOTIMPL;
1268}
1269
1271{
1273
1274 FIXME("%p %s %p\n", This, debugstr_w(group), enabled);
1275 return E_NOTIMPL;
1276}
1277
1279{
1281
1282 FIXME("%p %p\n", This, modifyState);
1283 return E_NOTIMPL;
1284}
1285
1286static const struct INetFwPolicy2Vtbl fw_policy2_vtbl =
1287{
1317};
1318
1320{
1321 fw_policy2 *fp;
1322
1323 TRACE("(%p,%p)\n", outer, obj);
1324
1325 fp = malloc( sizeof(*fp) );
1326 if (!fp) return E_OUTOFMEMORY;
1327
1329 fp->refs = 1;
1330
1331 *obj = &fp->INetFwPolicy2_iface;
1332
1334 {
1335 free( fp );
1336 return E_OUTOFMEMORY;
1337 }
1338
1339 TRACE("returning iface %p\n", *obj);
1340 return S_OK;
1341}
unsigned int dir
Definition: maze.c:112
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:125
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
static HRESULT WINAPI netfw_rule_put_Interfaces(INetFwRule *iface, VARIANT interfaces)
Definition: policy.c:417
static HRESULT WINAPI netfw_rule_get_Grouping(INetFwRule *iface, BSTR *grouping)
Definition: policy.c:467
static HRESULT WINAPI fw_policy_GetProfileByType(INetFwPolicy *iface, NET_FW_PROFILE_TYPE profileType, INetFwProfile **profile)
Definition: policy.c:962
static ULONG WINAPI netfw_rules_Release(INetFwRules *iface)
Definition: policy.c:654
static HRESULT WINAPI netfw_rule_put_LocalAddresses(INetFwRule *iface, BSTR addresses)
Definition: policy.c:337
static HRESULT WINAPI netfw_rule_QueryInterface(INetFwRule *iface, REFIID riid, void **object)
Definition: policy.c:69
static HRESULT WINAPI netfw_rules_GetTypeInfoCount(INetFwRules *iface, UINT *pctinfo)
Definition: policy.c:667
static HRESULT WINAPI netfw_rule_put_RemotePorts(INetFwRule *iface, BSTR ports)
Definition: policy.c:317
static HRESULT WINAPI fwpolicy2_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:1183
static ULONG WINAPI fw_policy_AddRef(INetFwPolicy *iface)
Definition: policy.c:834
static ULONG WINAPI netfw_rule_AddRef(INetFwRule *iface)
Definition: policy.c:93
static HRESULT WINAPI fwpolicy2_get_LocalPolicyModifyState(INetFwPolicy2 *iface, NET_FW_MODIFY_STATE *modifyState)
Definition: policy.c:1278
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:1084
static HRESULT WINAPI netfw_rules_Remove(INetFwRules *iface, BSTR name)
Definition: policy.c:765
static HRESULT WINAPI netfw_rule_get_ServiceName(INetFwRule *iface, BSTR *service)
Definition: policy.c:247
HRESULT NetFwPolicy_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: policy.c:986
static HRESULT WINAPI fwpolicy2_get_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:1254
static HRESULT WINAPI fwpolicy2_put_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL block)
Definition: policy.c:1151
static const struct INetFwRuleVtbl fw_rule_vtbl
Definition: policy.c:547
static HRESULT WINAPI netfw_rule_GetTypeInfoCount(INetFwRule *iface, UINT *pctinfo)
Definition: policy.c:113
static HRESULT WINAPI netfw_rule_put_ApplicationName(INetFwRule *iface, BSTR app)
Definition: policy.c:237
static HRESULT WINAPI fwpolicy2_GetTypeInfo(INetFwPolicy2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **info)
Definition: policy.c:1058
static HRESULT WINAPI netfw_rule_get_LocalAddresses(INetFwRule *iface, BSTR *addresses)
Definition: policy.c:327
static HRESULT WINAPI netfw_rule_put_Direction(INetFwRule *iface, NET_FW_RULE_DIRECTION dir)
Definition: policy.c:397
static HRESULT WINAPI fwpolicy2_GetTypeInfoCount(INetFwPolicy2 *iface, UINT *pctinfo)
Definition: policy.c:1049
HRESULT NetFwRule_create(IUnknown *outer, void **obj)
Definition: policy.c:594
static ULONG WINAPI netfw_rule_Release(INetFwRule *iface)
Definition: policy.c:100
static ULONG WINAPI netfw_rules_AddRef(INetFwRules *iface)
Definition: policy.c:647
static HRESULT WINAPI netfw_rules_GetTypeInfo(INetFwRules *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:678
static ULONG WINAPI fwpolicy2_AddRef(INetFwPolicy2 *iface)
Definition: policy.c:1030
static HRESULT WINAPI netfw_rule_put_Profiles(INetFwRule *iface, LONG profiles)
Definition: policy.c:497
static HRESULT WINAPI netfw_rules_Item(INetFwRules *iface, BSTR name, INetFwRule **rule)
Definition: policy.c:775
static HRESULT WINAPI netfw_rule_put_RemoteAddresses(INetFwRule *iface, BSTR addresses)
Definition: policy.c:357
static HRESULT WINAPI netfw_rules_get__NewEnum(INetFwRules *iface, IUnknown **newEnum)
Definition: policy.c:786
static const struct INetFwRulesVtbl fw_rules_vtbl
Definition: policy.c:800
static HRESULT WINAPI netfw_rule_put_ServiceName(INetFwRule *iface, BSTR service)
Definition: policy.c:257
static HRESULT WINAPI fwpolicy2_get_FirewallEnabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *enabled)
Definition: policy.c:1112
static HRESULT WINAPI fwpolicy2_get_ServiceRestriction(INetFwPolicy2 *iface, INetFwServiceRestriction **ServiceRestriction)
Definition: policy.c:1206
static HRESULT WINAPI fwpolicy2_RestoreLocalFirewallDefaults(INetFwPolicy2 *iface)
Definition: policy.c:1230
static HRESULT WINAPI netfw_rule_get_InterfaceTypes(INetFwRule *iface, BSTR *types)
Definition: policy.c:427
static HRESULT WINAPI netfw_rule_put_LocalPorts(INetFwRule *iface, BSTR ports)
Definition: policy.c:297
static HRESULT WINAPI fwpolicy2_EnableRuleGroup(INetFwPolicy2 *iface, LONG bitmask, BSTR group, VARIANT_BOOL enable)
Definition: policy.c:1214
static HRESULT WINAPI fwpolicy2_get_Rules(INetFwPolicy2 *iface, INetFwRules **rules)
Definition: policy.c:1191
static HRESULT WINAPI netfw_rules_GetIDsOfNames(INetFwRules *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:690
static HRESULT WINAPI fwpolicy2_get_CurrentProfileTypes(INetFwPolicy2 *iface, LONG *profile)
Definition: policy.c:1104
static HRESULT WINAPI netfw_rule_GetTypeInfo(INetFwRule *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:124
HRESULT NetFwPolicy2_create(IUnknown *outer, void **obj)
Definition: policy.c:1319
static HRESULT WINAPI fw_policy_GetTypeInfo(INetFwPolicy *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: policy.c:889
static HRESULT WINAPI netfw_rule_Invoke(INetFwRule *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: policy.c:159
static HRESULT WINAPI fwpolicy2_get_IsRuleGroupCurrentlyEnabled(INetFwPolicy2 *iface, BSTR group, VARIANT_BOOL *enabled)
Definition: policy.c:1270
static fw_rules * impl_from_INetFwRules(INetFwRules *iface)
Definition: policy.c:618
static HRESULT WINAPI netfw_rule_put_Name(INetFwRule *iface, BSTR name)
Definition: policy.c:197
static HRESULT WINAPI netfw_rule_get_Protocol(INetFwRule *iface, LONG *protocol)
Definition: policy.c:267
static HRESULT WINAPI netfw_rule_get_ApplicationName(INetFwRule *iface, BSTR *app)
Definition: policy.c:227
static HRESULT WINAPI netfw_rule_get_RemotePorts(INetFwRule *iface, BSTR *ports)
Definition: policy.c:307
static HRESULT WINAPI fw_policy_QueryInterface(INetFwPolicy *iface, REFIID riid, void **ppvObject)
Definition: policy.c:854
static HRESULT WINAPI fwpolicy2_put_NotificationsDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL disabled)
Definition: policy.c:1167
static const struct INetFwPolicy2Vtbl fw_policy2_vtbl
Definition: policy.c:1286
static HRESULT WINAPI fw_policy_get_CurrentProfile(INetFwPolicy *iface, INetFwProfile **profile)
Definition: policy.c:952
static HRESULT WINAPI fw_policy_GetIDsOfNames(INetFwPolicy *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:901
static HRESULT WINAPI netfw_rule_get_Name(INetFwRule *iface, BSTR *name)
Definition: policy.c:187
static HRESULT WINAPI fwpolicy2_GetIDsOfNames(INetFwPolicy2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:1066
static HRESULT WINAPI netfw_rule_put_Grouping(INetFwRule *iface, BSTR grouping)
Definition: policy.c:477
static HRESULT WINAPI fwpolicy2_IsRuleGroupEnabled(INetFwPolicy2 *iface, LONG bitmask, BSTR group, VARIANT_BOOL *enabled)
Definition: policy.c:1222
static HRESULT WINAPI netfw_rules_get_Count(INetFwRules *iface, LONG *count)
Definition: policy.c:741
static HRESULT WINAPI netfw_rule_get_LocalPorts(INetFwRule *iface, BSTR *ports)
Definition: policy.c:287
static HRESULT WINAPI fwpolicy2_put_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:1246
static HRESULT WINAPI netfw_rule_put_Protocol(INetFwRule *iface, LONG protocol)
Definition: policy.c:277
static HRESULT WINAPI fw_policy_GetTypeInfoCount(INetFwPolicy *iface, UINT *pctinfo)
Definition: policy.c:878
static HRESULT WINAPI netfw_rule_get_Direction(INetFwRule *iface, NET_FW_RULE_DIRECTION *dir)
Definition: policy.c:387
static HRESULT WINAPI fwpolicy2_put_DefaultOutboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION action)
Definition: policy.c:1262
static HRESULT WINAPI netfw_rule_put_Enabled(INetFwRule *iface, VARIANT_BOOL enabled)
Definition: policy.c:457
static HRESULT WINAPI netfw_rule_get_RemoteAddresses(INetFwRule *iface, BSTR *addresses)
Definition: policy.c:347
static HRESULT WINAPI netfw_rule_get_Interfaces(INetFwRule *iface, VARIANT *interfaces)
Definition: policy.c:407
static HRESULT WINAPI fwpolicy2_put_FirewallEnabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL enabled)
Definition: policy.c:1120
static HRESULT WINAPI netfw_rules_QueryInterface(INetFwRules *iface, REFIID riid, void **object)
Definition: policy.c:623
static fw_rule * impl_from_INetFwRule(INetFwRule *iface)
Definition: policy.c:64
static HRESULT WINAPI fwpolicy2_put_ExcludedInterfaces(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT interfaces)
Definition: policy.c:1136
static fw_policy * impl_from_INetFwPolicy(INetFwPolicy *iface)
Definition: policy.c:41
static ULONG WINAPI fw_policy_Release(INetFwPolicy *iface)
Definition: policy.c:841
static HRESULT WINAPI netfw_rule_get_Action(INetFwRule *iface, NET_FW_ACTION *action)
Definition: policy.c:527
static HRESULT WINAPI netfw_rule_get_Profiles(INetFwRule *iface, LONG *profiles)
Definition: policy.c:487
static HRESULT WINAPI fwpolicy2_get_ExcludedInterfaces(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT *interfaces)
Definition: policy.c:1128
static HRESULT WINAPI netfw_rule_put_InterfaceTypes(INetFwRule *iface, BSTR types)
Definition: policy.c:437
static HRESULT WINAPI netfw_rule_GetIDsOfNames(INetFwRule *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: policy.c:136
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:924
static HRESULT WINAPI fwpolicy2_QueryInterface(INetFwPolicy2 *iface, REFIID riid, void **out)
Definition: policy.c:1004
static HRESULT WINAPI netfw_rules_Add(INetFwRules *iface, INetFwRule *rule)
Definition: policy.c:755
static HRESULT WINAPI fwpolicy2_get_NotificationsDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *disabled)
Definition: policy.c:1159
static HRESULT WINAPI fwpolicy2_get_BlockAllInboundTraffic(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *block)
Definition: policy.c:1143
static HRESULT WINAPI netfw_rule_get_Enabled(INetFwRule *iface, VARIANT_BOOL *enabled)
Definition: policy.c:447
static HRESULT create_INetFwRules(INetFwRules **object)
Definition: policy.c:816
static HRESULT WINAPI netfw_rule_put_EdgeTraversal(INetFwRule *iface, VARIANT_BOOL enabled)
Definition: policy.c:517
static HRESULT WINAPI netfw_rule_put_IcmpTypesAndCodes(INetFwRule *iface, BSTR codes)
Definition: policy.c:377
static HRESULT WINAPI fwpolicy2_get_DefaultInboundAction(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, NET_FW_ACTION *action)
Definition: policy.c:1238
static HRESULT WINAPI netfw_rule_get_IcmpTypesAndCodes(INetFwRule *iface, BSTR *codes)
Definition: policy.c:367
static HRESULT WINAPI netfw_rule_put_Action(INetFwRule *iface, NET_FW_ACTION action)
Definition: policy.c:537
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:713
static HRESULT WINAPI fwpolicy2_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwPolicy2 *iface, NET_FW_PROFILE_TYPE2 profileType, VARIANT_BOOL *disabled)
Definition: policy.c:1175
static fw_policy2 * impl_from_INetFwPolicy2(INetFwPolicy2 *iface)
Definition: policy.c:53
static HRESULT WINAPI netfw_rule_put_Description(INetFwRule *iface, BSTR desc)
Definition: policy.c:217
static const struct INetFwPolicyVtbl fw_policy_vtbl
Definition: policy.c:973
static HRESULT WINAPI netfw_rule_get_Description(INetFwRule *iface, BSTR *desc)
Definition: policy.c:207
static HRESULT WINAPI netfw_rule_get_EdgeTraversal(INetFwRule *iface, VARIANT_BOOL *enabled)
Definition: policy.c:507
static ULONG WINAPI fwpolicy2_Release(INetFwPolicy2 *iface)
Definition: policy.c:1036
LONG refs
Definition: port.c:62
LCID lcid
Definition: locale.c:5660
static const char * debugstr_variant(const VARIANT *var)
Definition: dom.c:505
action
Definition: namespace.c:707
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
GLboolean GLuint group
Definition: glext.h:11120
GLboolean enable
Definition: glext.h:11120
unsigned int UINT
Definition: sysinfo.c:13
HRESULT NetFwProfile_create(IUnknown *, LPVOID *)
Definition: profile.c:331
@ INetFwRule_tid
@ INetFwPolicy2_tid
@ INetFwPolicy_tid
@ INetFwRules_tid
enum NET_FW_PROFILE_TYPE2_ NET_FW_PROFILE_TYPE2
enum NET_FW_PROFILE_TYPE_ NET_FW_PROFILE_TYPE
enum NET_FW_ACTION_ NET_FW_ACTION
enum NET_FW_RULE_DIRECTION_ NET_FW_RULE_DIRECTION
enum NET_FW_MODIFY_STATE_ NET_FW_MODIFY_STATE
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define profile
Definition: kernel32.h:12
#define debugstr_w
Definition: kernel32.h:32
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static IUnknown * outer
Definition: compobj.c:82
static VARIANTARG static DISPID
Definition: ordinal.c:49
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
#define TRACE(s)
Definition: solgame.cpp:4
INetFwRules * fw_policy2_rules
Definition: policy.c:49
LONG refs
Definition: policy.c:50
INetFwPolicy2 INetFwPolicy2_iface
Definition: policy.c:48
LONG refs
Definition: policy.c:38
INetFwPolicy INetFwPolicy_iface
Definition: policy.c:37
Definition: policy.c:59
LONG refs
Definition: policy.c:61
INetFwRule INetFwRule_iface
Definition: policy.c:60
LONG refs
Definition: policy.c:615
INetFwRules INetFwRules_iface
Definition: policy.c:614
Definition: name.c:39
Definition: cmds.c:130
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480
static unsigned int block
Definition: xmlmemory.c:101