xref: /reactos/sdk/include/psdk/netcfgx.h (revision 6924b8ff)
1 #ifndef __NETCFGX_H__
2 #define __NETCFGX_H__
3 
4 #undef  INTERFACE
5 #define INTERFACE   INetCfgLock
6 DECLARE_INTERFACE_(INetCfgLock, IUnknown)
7 {
8     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
9     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
10     STDMETHOD_(ULONG,Release) (THIS) PURE;
11     STDMETHOD_(HRESULT,AcquireWriteLock)(THIS_ DWORD cmsTimeout, LPCWSTR pszwClientDescription, LPWSTR *ppszwClientDescription) PURE;
12     STDMETHOD_(HRESULT,ReleaseWriteLock)(THIS) PURE;
13     STDMETHOD_(HRESULT,IsWriteLocked)(THIS_ LPWSTR *ppszwClientDescription) PURE;
14 };
15 #undef INTERFACE
16 
17 EXTERN_C const IID IID_INetCfgLock;
18 
19 #if !defined(__cplusplus) || defined(CINTERFACE)
20 /*** IUnknown methods ***/
21 #define INetCfgLock_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
22 #define INetCfgLock_AddRef(p)                  (p)->lpVtbl->AddRef(p)
23 #define INetCfgLock_Release(p)                 (p)->lpVtbl->Release(p)
24 #define INetCfgLock_AcquireWriteLock(p,a,b,c)  (p)->lpVtbl->AcquireWriteLock(p,a,b,c)
25 #define INetCfgLock_ReleaseWriteLock(p)        (p)->lpVtbl->ReleaseWriteLock(p)
26 #define INetCfgLock_IsWriteLocked(p,a)         (p)->lpVtbl->IsWriteLocked(p,a)
27 #endif
28 
29 typedef enum
30 {
31     NCRP_QUERY_PROPERTY_UI  = 1,
32     NCRP_SHOW_PROPERTY_UI   = 2
33 }NCRP_FLAGS;
34 
35 
36 #undef  INTERFACE
37 #define INTERFACE   INetCfgComponent
38 DECLARE_INTERFACE_(INetCfgComponent, IUnknown)
39 {
40     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
41     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
42     STDMETHOD_(ULONG,Release) (THIS) PURE;
43     STDMETHOD_(HRESULT,GetDisplayName)(THIS_ LPWSTR *ppszwDisplayName) PURE;
44     STDMETHOD_(HRESULT,SetDisplayName)(THIS_ LPCWSTR ppszwDisplayName) PURE;
45     STDMETHOD_(HRESULT,GetHelpText)(THIS_ LPWSTR *pszwHelpText) PURE;
46     STDMETHOD_(HRESULT,GetId)(THIS_ LPWSTR *ppszwId) PURE;
47     STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ LPDWORD pdwCharacteristics) PURE;
48     STDMETHOD_(HRESULT,GetInstanceGuid)(THIS_ GUID *pGuid) PURE;
49     STDMETHOD_(HRESULT,GetPnpDevNodeId)(THIS_  LPWSTR *ppszwDevNodeId) PURE;
50     STDMETHOD_(HRESULT,GetClassGuid)(THIS_  GUID *pGuid) PURE;
51     STDMETHOD_(HRESULT,GetBindName)(THIS_ LPWSTR *ppszwBindName) PURE;
52     STDMETHOD_(HRESULT,GetDeviceStatus)(THIS_ ULONG *pulStatus) PURE;
53     STDMETHOD_(HRESULT,OpenParamKey)(THIS_ HKEY *phkey) PURE;
54     STDMETHOD_(HRESULT,RaisePropertyUi)(THIS_ HWND hwndParent, DWORD dwFlags, IUnknown *punkContext) PURE;
55 };
56 #undef INTERFACE
57 
58 #if !defined(__cplusplus) || defined(CINTERFACE)
59 /*** IUnknown methods ***/
60 #define INetCfgComponent_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
61 #define INetCfgComponent_AddRef(p)                  (p)->lpVtbl->AddRef(p)
62 #define INetCfgComponent_Release(p)                 (p)->lpVtbl->Release(p)
63 #define INetCfgComponent_GetDisplayName(p,a)        (p)->lpVtbl->GetDisplayName(p,a)
64 #define INetCfgComponent_SetDisplayName(p,a)        (p)->lpVtbl->SetDisplayName(p,a)
65 #define INetCfgComponent_GetHelpText(p,a)           (p)->lpVtbl->GetHelpText(p,a)
66 #define INetCfgComponent_GetId(p,a)                 (p)->lpVtbl->GetId(p,a)
67 #define INetCfgComponent_GetCharacteristics(p,a)    (p)->lpVtbl->GetCharacteristics(p,a)
68 #define INetCfgComponent_GetInstanceGuid(p,a)       (p)->lpVtbl->GetInstanceGuid(p,a)
69 #define INetCfgComponent_GetPnpDevNodeId(p,a)       (p)->lpVtbl->GetPnpDevNodeId(p,a)
70 #define INetCfgComponent_GetClassGuid(p,a)          (p)->lpVtbl->GetClassGuid(p,a)
71 #define INetCfgComponent_GetBindName(p,a)           (p)->lpVtbl->GetBindName(p,a)
72 #define INetCfgComponent_GetDeviceStatus(p,a)       (p)->lpVtbl->GetDeviceStatus(p,a)
73 #define INetCfgComponent_OpenParamKey(p,a)          (p)->lpVtbl->OpenParamKey(p,a)
74 #define INetCfgComponent_RaisePropertyUi(p,a,b,c)   (p)->lpVtbl->RaisePropertyUi(p,a,b,c)
75 #endif
76 
77 EXTERN_C const IID IID_INetCfgComponent;
78 
79 #undef  INTERFACE
80 #define INTERFACE   INetCfgBindingInterface
81 DECLARE_INTERFACE_(INetCfgBindingInterface, IUnknown)
82 {
83     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
84     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
85     STDMETHOD_(ULONG,Release) (THIS) PURE;
86     STDMETHOD_(HRESULT,GetName)(THIS_ LPWSTR *ppszwInterfaceName) PURE;
87     STDMETHOD_(HRESULT,GetUpperComponent)(THIS_ INetCfgComponent **ppnccItem) PURE;
88     STDMETHOD_(HRESULT,GetLowerComponent)(THIS_ INetCfgComponent **ppnccItem) PURE;
89 };
90 #undef INTERFACE
91 
92 
93 #if !defined(__cplusplus) || defined(CINTERFACE)
94 /*** IUnknown methods ***/
95 #define INetCfgBindingInterface_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
96 #define INetCfgBindingInterface_AddRef(p)                  (p)->lpVtbl->AddRef(p)
97 #define INetCfgBindingInterface_Release(p)                 (p)->lpVtbl->Release(p)
98 #define INetCfgBindingInterface_GetName(p,a)               (p)->lpVtbl->GetName(p)
99 #define INetCfgBindingInterface_GetUpperComponent(p,a)     (p)->lpVtbl->GetUpperComponent(p)
100 #define INetCfgBindingInterface_GetLowerComponent(p,a)     (p)->lpVtbl->GetLowerComponent(p)
101 #endif
102 
103 EXTERN_C const IID IID_INetCfgBindingInterface;
104 
105 
106 #undef  INTERFACE
107 #define INTERFACE   IEnumNetCfgBindingInterface
108 DECLARE_INTERFACE_(IEnumNetCfgBindingInterface, IUnknown)
109 {
110     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
111     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
112     STDMETHOD_(ULONG,Release) (THIS) PURE;
113     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, INetCfgBindingInterface **rgelt, ULONG *pceltFetched) PURE;
114     STDMETHOD_(HRESULT,Skip) (THIS_ ULONG celt) PURE;
115     STDMETHOD_(HRESULT,Reset) (THIS) PURE;
116     STDMETHOD_(HRESULT,Clone) (THIS_ IEnumNetCfgBindingInterface **ppenum) PURE;
117 };
118 #undef INTERFACE
119 
120 #if !defined(__cplusplus) || defined(CINTERFACE)
121 /*** IUnknown methods ***/
122 #define IEnumNetCfgBindingInterface_QueryInterface(p,a,b)         (p)->lpVtbl->QueryInterface(p,a,b)
123 #define IEnumNetCfgBindingInterface_AddRef(p)                     (p)->lpVtbl->AddRef(p)
124 #define IEnumNetCfgBindingInterface_Release(p)                    (p)->lpVtbl->Release(p)
125 #define IEnumNetCfgBindingInterface_Next(p,a,b,c)                   (p)->lpVtbl->Next(p,a,b,c)
126 #define IEnumNetCfgBindingInterface_Skip(p,a)                       (p)->lpVtbl->Skip(p,a)
127 #define IEnumNetCfgBindingInterface_Reset(p)                        (p)->lpVtbl->Reset(p)
128 #define IEnumNetCfgBindingInterface_Clone(p,a)                      (p)->lpVtbl->Clone(p,a)
129 #endif
130 
131 EXTERN_C const IID IID_IEnumNetCfgBindingInterface;
132 
133 #undef  INTERFACE
134 #define INTERFACE   INetCfgBindingPath
135 DECLARE_INTERFACE_(INetCfgBindingPath, IUnknown)
136 {
137     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
138     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
139     STDMETHOD_(ULONG,Release) (THIS) PURE;
140     STDMETHOD_(HRESULT,IsSamePathAs)(THIS_ INetCfgBindingPath *pPath) PURE;
141     STDMETHOD_(HRESULT,IsSubPathOf)(THIS_ INetCfgBindingPath *pPath) PURE;
142     STDMETHOD_(HRESULT,IsEnabled) (THIS) PURE;
143     STDMETHOD_(HRESULT,Enable) (THIS_ BOOL fEnable) PURE;
144     STDMETHOD_(HRESULT,GetPathToken) (THIS_ LPWSTR *ppszwPathToken) PURE;
145     STDMETHOD_(HRESULT,GetOwner)(THIS_ INetCfgComponent **ppComponent) PURE;
146     STDMETHOD_(HRESULT,GetDepth)(THIS_ ULONG *pcInterfaces) PURE;
147     STDMETHOD_(HRESULT,EnumBindingInterfaces)(THIS_ IEnumNetCfgBindingInterface **ppenumInterface) PURE;
148 };
149 
150 #if !defined(__cplusplus) || defined(CINTERFACE)
151 /*** IUnknown methods ***/
152 #define INetCfgBindingPath_QueryInterface(p,a,b)         (p)->lpVtbl->QueryInterface(p,a,b)
153 #define INetCfgBindingPath_AddRef(p)                     (p)->lpVtbl->AddRef(p)
154 #define INetCfgBindingPath_Release(p)                    (p)->lpVtbl->Release(p)
155 #define INetCfgBindingPath_IsSamePathAs(p,a)             (p)->lpVtbl->IsSamePathAs(p,a)
156 #define INetCfgBindingPath_IsSubPathOf(p,a)              (p)->lpVtbl->IsSubPathOf(p,a)
157 #define INetCfgBindingPath_IsEnabled(p)                  (p)->lpVtbl->IsEnabled(p)
158 #define INetCfgBindingPath_Enable(p,a)                   (p)->lpVtbl->Enable(p,a)
159 #define INetCfgBindingPath_GetPathToken(p,a)             (p)->lpVtbl->GetPathToken(p,a)
160 #define INetCfgBindingPath_GetOwner(p,a)                 (p)->lpVtbl->GetOwner(p,a)
161 #define INetCfgBindingPath_GetDepth(p,a)                 (p)->lpVtbl->GetDepth(p,a)
162 #define INetCfgBindingPath_EnumBindingInterfaces(p,a)    (p)->lpVtbl->EnumBindingInterfaces(p,a)
163 #endif
164 
165 EXTERN_C const IID IID_INetCfgBindingPath;
166 
167 #undef  INTERFACE
168 #define INTERFACE   IEnumNetCfgBindingPath
169 DECLARE_INTERFACE_(IEnumNetCfgBindingPath, IUnknown)
170 {
171     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
172     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
173     STDMETHOD_(ULONG,Release) (THIS) PURE;
174     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, INetCfgBindingPath **rgelt, ULONG *pceltFetched) PURE;
175     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt)  PURE;
176     STDMETHOD_(HRESULT,Reset)(THIS)  PURE;
177     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumNetCfgBindingPath **ppenum)  PURE;
178 };
179 #undef INTERFACE
180 
181 #if !defined(__cplusplus) || defined(CINTERFACE)
182 /*** IUnknown methods ***/
183 #define IEnumNetCfgBindingPath_QueryInterface(p,a,b)           (p)->lpVtbl->QueryInterface(p,a,b)
184 #define IEnumNetCfgBindingPath_AddRef(p)                       (p)->lpVtbl->AddRef(p)
185 #define IEnumNetCfgBindingPath_Release(p)                      (p)->lpVtbl->Release(p)
186 #define IEnumNetCfgBindingPath_Next(p,a,b,c)                   (p)->lpVtbl->Next(p,a,b,c)
187 #define IEnumNetCfgBindingPath_Skip(p,a)                       (p)->lpVtbl->Skip(p,a)
188 #define IEnumNetCfgBindingPath_Reset(p)                        (p)->lpVtbl->Reset(p)
189 #define IEnumNetCfgBindingPath_Clone(p,a)                      (p)->lpVtbl->Clone(p,a)
190 #endif
191 
192 EXTERN_C const IID IID_IEnumNetCfgBindingPath;
193 
194 typedef enum
195 {
196     NCF_LOWER = 0x1,
197     NCF_UPPER = 0x2
198 }SUPPORTS_BINDING_INTERFACE_FLAGS;
199 
200 typedef enum
201 {
202     EBP_ABOVE   = 0x1,
203     EBP_BELOW   = 0x2
204 }ENUM_BINDING_PATHS_FLAGS;
205 
206 #undef  INTERFACE
207 #define INTERFACE   INetCfgComponentBindings
208 DECLARE_INTERFACE_(INetCfgComponentBindings, IUnknown)
209 {
210     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
211     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
212     STDMETHOD_(ULONG,Release) (THIS) PURE;
213     STDMETHOD_(HRESULT,BindTo)(THIS_ INetCfgComponent *pnccItem) PURE;
214     STDMETHOD_(HRESULT,UnbindFrom)(THIS_ INetCfgComponent *pnccItem) PURE;
215     STDMETHOD_(HRESULT,SupportsBindingInterface)(THIS_ DWORD dwFlags, LPCWSTR pszwInterfaceName) PURE;
216     STDMETHOD_(HRESULT,IsBoundTo)(THIS_ INetCfgComponent *pnccItem) PURE;
217     STDMETHOD_(HRESULT,IsBindableTo)(THIS_ INetCfgComponent *pnccItem) PURE;
218     STDMETHOD_(HRESULT,EnumBindingPaths)(THIS_ DWORD dwFlags, IEnumNetCfgBindingPath **ppIEnum) PURE;
219     STDMETHOD_(HRESULT,MoveBefore)(THIS_ DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest) PURE;
220     STDMETHOD_(HRESULT,MoveAfter)(THIS_ DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest) PURE;
221 };
222 #undef INTERFACE
223 
224 #if !defined(__cplusplus) || defined(CINTERFACE)
225 /*** IUnknown methods ***/
226 #define INetCfgComponentBindings_QueryInterface(p,a,b)           (p)->lpVtbl->QueryInterface(p,a,b)
227 #define INetCfgComponentBindings_AddRef(p)                       (p)->lpVtbl->AddRef(p)
228 #define INetCfgComponentBindings_Release(p)                      (p)->lpVtbl->Release(p)
229 #define INetCfgComponentBindings_BindTo(p,a)                     (p)->lpVtbl->BindTo(p,a)
230 #define INetCfgComponentBindings_UnbindFrom(p,a)                 (p)->lpVtbl->UnbindFrom(p,a)
231 #define INetCfgComponentBindings_SupportsBindingInterface(p,a,b) (p)->lpVtbl->UnbindFrom(p,a,b)
232 #define INetCfgComponentBindings_IsBoundTo(p,a)                  (p)->lpVtbl->IsBoundTo(p,a)
233 #define INetCfgComponentBindings_IsBindableTo(p,a)               (p)->lpVtbl->IsBindableTo(p,a)
234 #define INetCfgComponentBindings_EnumBindingPaths(p,a,b)         (p)->lpVtbl->EnumBindingPaths(p,a,b)
235 #define INetCfgComponentBindings_MoveBefore(p,a,b,c)             (p)->lpVtbl->MoveBefore(p,a,b,c)
236 #define INetCfgComponentBindings_MoveAfter(p,a,b,c)              (p)->lpVtbl->MoveAfter(p,a,b,c)
237 #endif
238 
239 EXTERN_C const IID IID_INetCfgComponentBindings;
240 
241 #undef  INTERFACE
242 #define INTERFACE   IEnumNetCfgComponent
243 DECLARE_INTERFACE_(IEnumNetCfgComponent, IUnknown)
244 {
245     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
246     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
247     STDMETHOD_(ULONG,Release) (THIS) PURE;
248     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, INetCfgComponent **rgelt, ULONG *pceltFetched) PURE;
249     STDMETHOD_(HRESULT,Skip) (THIS_ ULONG celt) PURE;
250     STDMETHOD_(HRESULT,Reset) (THIS) PURE;
251     STDMETHOD_(HRESULT,Clone) (THIS_ IEnumNetCfgComponent **ppenum) PURE;
252 };
253 #undef INTERFACE
254 
255 #if !defined(__cplusplus) || defined(CINTERFACE)
256 /*** IUnknown methods ***/
257 #define IEnumNetCfgComponent_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
258 #define IEnumNetCfgComponent_AddRef(p)                  (p)->lpVtbl->AddRef(p)
259 #define IEnumNetCfgComponent_Release(p)                 (p)->lpVtbl->Release(p)
260 #define IEnumNetCfgComponent_Next(p,a,b,c)              (p)->lpVtbl->Next(p,a,b,c)
261 #define IEnumNetCfgComponent_Skip(p,a)                  (p)->lpVtbl->Skip(p,a)
262 #define IEnumNetCfgComponent_Reset(p)                   (p)->lpVtbl->Reset(p)
263 #define IEnumNetCfgComponent_Clone(p,a)                 (p)->lpVtbl->Clone(p,a)
264 #endif
265 
266 EXTERN_C const IID IID_IEnumNetCfgComponent;
267 
268 #undef  INTERFACE
269 #define INTERFACE   INetCfg
270 DECLARE_INTERFACE_(INetCfg, IUnknown)
271 {
272     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
273     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
274     STDMETHOD_(ULONG,Release) (THIS) PURE;
275     STDMETHOD_(HRESULT,Initialize) (THIS_ PVOID pvReserved) PURE;
276     STDMETHOD_(HRESULT,Uninitialize) (THIS) PURE;
277     STDMETHOD_(HRESULT,Apply) (THIS) PURE;
278     STDMETHOD_(HRESULT,Cancel) (THIS) PURE;
279     STDMETHOD_(HRESULT,EnumComponents) (THIS_ const GUID *pguidClass, IEnumNetCfgComponent **ppenumComponent) PURE;
280     STDMETHOD_(HRESULT,FindComponent) (THIS_ LPCWSTR pszwInfId, INetCfgComponent **ppenumComponent) PURE;
281     STDMETHOD_(HRESULT,QueryNetCfgClass) (THIS_ const GUID *pguidClass, REFIID riid, void **ppvObject) PURE;
282 };
283 #undef INTERFACE
284 
285 #if !defined(__cplusplus) || defined(CINTERFACE)
286 /*** IUnknown methods ***/
287 #define INetCfg_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
288 #define INetCfg_AddRef(p)                  (p)->lpVtbl->AddRef(p)
289 #define INetCfg_Release(p)                 (p)->lpVtbl->Release(p)
290 #define INetCfg_Initialize(p,a)            (p)->lpVtbl->Initialize(p,a)
291 #define INetCfg_Uninitialize(p)            (p)->lpVtbl->Uninitialize(p)
292 #define INetCfg_Apply(p)                   (p)->lpVtbl->Apply(p)
293 #define INetCfg_Cancel(p)                  (p)->lpVtbl->Cancel(p)
294 #define INetCfg_EnumComponents(p,a,b)      (p)->lpVtbl->EnumComponents(p,a,b)
295 #define INetCfg_FindComponent(p,a,b)       (p)->lpVtbl->FindComponent(p,a,b)
296 #define INetCfg_QueryNetCfgClass(p,a,b,c)  (p)->lpVtbl->QueryNetCfgClass(p,a,b,c)
297 #endif
298 
299 EXTERN_C const GUID CLSID_CNetCfg;
300 EXTERN_C const IID IID_INetCfg;
301 
302 #define NETCFG_E_ALREADY_INITIALIZED                 0x8004A020
303 #define NETCFG_E_NOT_INITIALIZED                     0x8004A021
304 #define NETCFG_E_IN_USE                              0x8004A022
305 #define NETCFG_E_NO_WRITE_LOCK                       0x8004A024
306 #define NETCFG_E_NEED_REBOOT                         0x8004A025
307 #define NETCFG_E_ACTIVE_RAS_CONNECTIONS              0x8004A026
308 #define NETCFG_E_ADAPTER_NOT_FOUND                   0x8004A027
309 #define NETCFG_E_COMPONENT_REMOVED_PENDING_REBOOT    0x8004A028
310 #define NETCFG_E_MAX_FILTER_LIMIT                    0x8004A029
311 #define NETCFG_S_REBOOT                              0x8004A020
312 #define NETCFG_S_DISABLE_QUERY                       0x8004A022
313 #define NETCFG_S_STILL_REFERENCED                    0x8004A023
314 #define NETCFG_S_CAUSED_SETUP_CHANGE                 0x8004A024
315 #define NETCFG_S_COMMIT_NOW                          0x8004A025
316 
317 
318 #endif
319