ReactOS 0.4.16-dev-250-g3ecd236
netcfgbindingpath_iface.c
Go to the documentation of this file.
1#include "precomp.h"
2
3typedef struct
4{
5 const INetCfgBindingPath *lpVtbl;
8
9typedef struct
10{
11 const IEnumNetCfgBindingPath *lpVtbl;
14
15
16/***************************************************************
17 * INetCfgBindingPath
18 */
19
23 INetCfgBindingPath *iface,
24 REFIID iid,
25 LPVOID *ppvObj)
26{
28 *ppvObj = NULL;
29
30 if (IsEqualIID (iid, &IID_IUnknown) ||
32 {
33 *ppvObj = This;
34 return S_OK;
35 }
36
37 return E_NOINTERFACE;
38}
39
43 INetCfgBindingPath * iface)
44{
46 ULONG refCount = InterlockedIncrement(&This->ref);
47
48 return refCount;
49}
50
54 INetCfgBindingPath *iface)
55{
57 ULONG refCount = InterlockedDecrement(&This->ref);
58
59 if (!refCount)
60 {
62 }
63 return refCount;
64}
65
69 INetCfgBindingPath *iface,
70 INetCfgBindingPath *pPath)
71{
72 return E_NOTIMPL;
73}
74
78 INetCfgBindingPath *iface,
79 INetCfgBindingPath *pPath)
80{
81 return E_NOTIMPL;
82}
83
87 INetCfgBindingPath *iface)
88{
89 return E_NOTIMPL;
90}
91
95 INetCfgBindingPath *iface,
96 BOOL fEnable)
97{
98 return E_NOTIMPL;
99}
100
102WINAPI
104 INetCfgBindingPath *iface,
105 LPWSTR *ppszwPathToken)
106{
107 return E_NOTIMPL;
108}
109
111WINAPI
113 INetCfgBindingPath *iface,
114 INetCfgComponent **ppComponent)
115{
116 return E_NOTIMPL;
117}
118
120WINAPI
122 INetCfgBindingPath *iface,
123 ULONG *pcInterfaces)
124{
125 return E_NOTIMPL;
126}
127
129WINAPI
131 INetCfgBindingPath *iface,
132 IEnumNetCfgBindingInterface **ppenumInterface)
133{
135}
136
137static const INetCfgBindingPathVtbl vt_NetCfgBindingPath =
138{
150};
151
153WINAPI
155 IUnknown *pUnkOuter,
156 REFIID riid,
157 LPVOID *ppv)
158{
160
161 if (!ppv)
162 return E_POINTER;
163
165 if (!This)
166 return E_OUTOFMEMORY;
167
168 This->ref = 1;
169 This->lpVtbl = (const INetCfgBindingPath*)&vt_NetCfgBindingPath;
170
171 if (!SUCCEEDED (INetCfgBindingPath_QueryInterface ((INetCfgBindingPath*)This, riid, ppv)))
172 {
173 return E_NOINTERFACE;
174 }
175
176 INetCfgBindingPath_Release((INetCfgBindingPath*)This);
177 return S_OK;
178}
179
180
181/***************************************************************
182 * IEnumNetCfgBindingPath
183 */
184
186WINAPI
188 IEnumNetCfgBindingPath *iface,
189 REFIID iid,
190 LPVOID *ppvObj)
191{
193 *ppvObj = NULL;
194
195 if (IsEqualIID (iid, &IID_IUnknown) ||
197 {
198 *ppvObj = This;
199 return S_OK;
200 }
201
202 return E_NOINTERFACE;
203}
204
205
206ULONG
207WINAPI
209 IEnumNetCfgBindingPath *iface)
210{
212 ULONG refCount = InterlockedIncrement(&This->ref);
213
214 return refCount;
215}
216
217ULONG
218WINAPI
220 IEnumNetCfgBindingPath *iface)
221{
223 ULONG refCount = InterlockedDecrement(&This->ref);
224
225 return refCount;
226}
227
229WINAPI
231 IEnumNetCfgBindingPath *iface,
232 ULONG celt,
233 INetCfgBindingPath **rgelt,
234 ULONG *pceltFetched)
235{
236#if 0
238 HRESULT hr;
239
240 if (!iface || !rgelt)
241 return E_POINTER;
242
243 if (celt != 1)
244 return E_INVALIDARG;
245
246 if (!This->pCurrent)
247 return S_FALSE;
248
250 if (SUCCEEDED(hr))
251 {
252 This->pCurrent = This->pCurrent->pNext;
253 if (pceltFetched)
254 *pceltFetched = 1;
255 }
256 return hr;
257#endif
258
259 return E_NOTIMPL;
260}
261
263WINAPI
265 IEnumNetCfgBindingPath *iface,
266 ULONG celt)
267{
268#if 0
270
271 if (!This->pCurrent)
272 return S_FALSE;
273
274 while (celt-- > 0 && This->pCurrent)
275 This->pCurrent = This->pCurrent->pNext;
276
277 if (!celt)
278 return S_OK;
279 else
280 return S_FALSE;
281#endif
282
283 return E_NOTIMPL;
284}
285
287WINAPI
289 IEnumNetCfgBindingPath *iface)
290{
291#if 0
293
294 This->pCurrent = This->pHead;
295 return S_OK;
296#endif
297
298 return E_NOTIMPL;
299}
300
302WINAPI
304 IEnumNetCfgBindingPath *iface,
305 IEnumNetCfgBindingPath **ppenum)
306{
307 return E_NOTIMPL;
308}
309
310static const IEnumNetCfgBindingPathVtbl vt_EnumNetCfgBindingPath =
311{
319};
320
322WINAPI
324{
326
327 if (!ppv)
328 return E_POINTER;
329
331 if (!This)
332 return E_OUTOFMEMORY;
333
334 This->ref = 1;
335 This->lpVtbl = (const IEnumNetCfgBindingPath*)&vt_EnumNetCfgBindingPath;
336#if 0
337 This->pCurrent = pItem;
338 This->pHead = pItem;
339 This->pNCfg = pNCfg;
340#endif
341
342 if (!SUCCEEDED (IEnumNetCfgBindingPath_QueryInterface((INetCfgBindingPath*)This, riid, ppv)))
343 {
345 return E_NOINTERFACE;
346 }
347
348 IEnumNetCfgBindingPath_Release((IEnumNetCfgBindingPath*)This);
349 return S_OK;
350}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT WINAPI IEnumNetCfgBindingInterface_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
HRESULT WINAPI IEnumNetCfgBindingPath_fnNext(IEnumNetCfgBindingPath *iface, ULONG celt, INetCfgBindingPath **rgelt, ULONG *pceltFetched)
HRESULT WINAPI IEnumNetCfgBindingPath_fnClone(IEnumNetCfgBindingPath *iface, IEnumNetCfgBindingPath **ppenum)
HRESULT WINAPI INetCfgBindingPath_fnGetOwner(INetCfgBindingPath *iface, INetCfgComponent **ppComponent)
HRESULT WINAPI INetCfgBindingPath_fnEnumBindingInterfaces(INetCfgBindingPath *iface, IEnumNetCfgBindingInterface **ppenumInterface)
HRESULT WINAPI IEnumNetCfgBindingPath_fnReset(IEnumNetCfgBindingPath *iface)
HRESULT WINAPI INetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
HRESULT WINAPI IEnumNetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, DWORD dwFlags)
HRESULT WINAPI INetCfgBindingPath_fnIsSubPathOf(INetCfgBindingPath *iface, INetCfgBindingPath *pPath)
HRESULT WINAPI INetCfgBindingPath_fnQueryInterface(INetCfgBindingPath *iface, REFIID iid, LPVOID *ppvObj)
ULONG WINAPI INetCfgBindingPath_fnRelease(INetCfgBindingPath *iface)
HRESULT WINAPI INetCfgBindingPath_fnGetPathToken(INetCfgBindingPath *iface, LPWSTR *ppszwPathToken)
static const IEnumNetCfgBindingPathVtbl vt_EnumNetCfgBindingPath
HRESULT WINAPI INetCfgBindingPath_fnEnable(INetCfgBindingPath *iface, BOOL fEnable)
static const INetCfgBindingPathVtbl vt_NetCfgBindingPath
HRESULT WINAPI IEnumNetCfgBindingPath_fnQueryInterface(IEnumNetCfgBindingPath *iface, REFIID iid, LPVOID *ppvObj)
HRESULT WINAPI INetCfgBindingPath_fnIsSamePathAs(INetCfgBindingPath *iface, INetCfgBindingPath *pPath)
HRESULT WINAPI INetCfgBindingPath_fnGetDepth(INetCfgBindingPath *iface, ULONG *pcInterfaces)
ULONG WINAPI INetCfgBindingPath_fnAddRef(INetCfgBindingPath *iface)
HRESULT WINAPI INetCfgBindingPath_fnIsEnabled(INetCfgBindingPath *iface)
ULONG WINAPI IEnumNetCfgBindingPath_fnRelease(IEnumNetCfgBindingPath *iface)
ULONG WINAPI IEnumNetCfgBindingPath_fnAddRef(IEnumNetCfgBindingPath *iface)
HRESULT WINAPI IEnumNetCfgBindingPath_fnSkip(IEnumNetCfgBindingPath *iface, ULONG celt)
#define INetCfgBindingPath_Release(p)
Definition: netcfgx.h:154
EXTERN_C const IID IID_IEnumNetCfgBindingInterface
Definition: netcfgx.h:131
EXTERN_C const IID IID_INetCfgComponent
Definition: netcfgx.h:77
EXTERN_C const IID IID_INetCfgBindingPath
Definition: netcfgx.h:165
#define IEnumNetCfgBindingPath_Release(p)
Definition: netcfgx.h:185
#define IEnumNetCfgBindingPath_QueryInterface(p, a, b)
Definition: netcfgx.h:183
#define INetCfgBindingPath_QueryInterface(p, a, b)
Definition: netcfgx.h:152
EXTERN_C const IID IID_IEnumNetCfgBindingPath
Definition: netcfgx.h:192
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
HRESULT hr
Definition: shlfolder.c:183
const IEnumNetCfgBindingPath * lpVtbl
const INetCfgBindingPath * lpVtbl
uint32_t ULONG
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
WCHAR * LPWSTR
Definition: xmlstorage.h:184