ReactOS  0.4.14-dev-293-g2b39b42
inetcfgcomp_iface.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
3 typedef struct
4 {
5  const INetCfgComponent *lpVtbl;
6  const INetCfgComponentBindings *lpVtblComponentBindings;
9  INetCfgComponentPropertyUi * pProperty;
10  INetCfg * pNCfg;
12 
13 typedef struct
14 {
15  const IEnumNetCfgComponent * lpVtbl;
19  INetCfg * pNCfg;
21 
22 static __inline INetCfgComponentImpl* impl_from_INetCfgComponentBindings(INetCfgComponentBindings *iface)
23 {
24  return (INetCfgComponentImpl*)((char *)iface - FIELD_OFFSET(INetCfgComponentImpl, lpVtblComponentBindings));
25 }
26 
27 
28 /***************************************************************
29  * INetCfgComponentBindings
30  */
31 
32 HRESULT
33 WINAPI
35  INetCfgComponentBindings *iface,
36  REFIID iid,
37  LPVOID *ppvObj)
38 {
40  return INetCfgComponent_QueryInterface((INetCfgComponent*)This, iid, ppvObj);
41 }
42 
43 ULONG
44 WINAPI
46  INetCfgComponentBindings *iface)
47 {
49  return INetCfgComponent_AddRef((INetCfgComponent*)This);
50 }
51 
52 ULONG
53 WINAPI
55  INetCfgComponentBindings *iface)
56 {
58  return INetCfgComponent_Release((INetCfgComponent*)This);
59 }
60 
61 HRESULT
62 WINAPI
64  INetCfgComponentBindings *iface,
65  INetCfgComponent *pnccItem)
66 {
67  return E_NOTIMPL;
68 }
69 
70 HRESULT
71 WINAPI
73  INetCfgComponentBindings *iface,
74  INetCfgComponent *pnccItem)
75 {
76  return E_NOTIMPL;
77 }
78 
79 HRESULT
80 WINAPI
82  INetCfgComponentBindings *iface,
83  DWORD dwFlags,
84  LPCWSTR pszwInterfaceName)
85 {
86  return E_NOTIMPL;
87 }
88 
89 HRESULT
90 WINAPI
92  INetCfgComponentBindings *iface,
93  INetCfgComponent *pnccItem)
94 {
95  INetCfgComponentImpl *pComponent;
96  PWSTR pszBindName, ptr;
97  INT len;
98 
99  pComponent = impl_from_INetCfgComponentBindings(iface);
100  if (pComponent == NULL ||
101  pComponent->pItem == NULL ||
102  pComponent->pItem->pszBinding == NULL)
103  return E_POINTER;
104 
105  if (pnccItem == NULL ||
106  ((INetCfgComponentImpl*)pnccItem)->pItem == NULL ||
107  ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName == NULL)
108  return E_POINTER;
109 
110  pszBindName = ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName;
111 
112  ptr = pComponent->pItem->pszBinding;
113  while (*ptr != UNICODE_NULL)
114  {
115  len = wcslen(ptr);
116 
117  if (len > 8 && _wcsicmp(&ptr[8], pszBindName) == 0)
118  return S_OK;
119 
120  ptr = ptr + len + 1;
121  }
122 
123  return S_FALSE;
124 }
125 
126 HRESULT
127 WINAPI
129  INetCfgComponentBindings *iface,
130  INetCfgComponent *pnccItem)
131 {
132  return E_NOTIMPL;
133 }
134 
135 HRESULT
136 WINAPI
138  INetCfgComponentBindings *iface,
139  DWORD dwFlags,
140  IEnumNetCfgBindingPath **ppIEnum)
141 {
143 }
144 
145 HRESULT
146 WINAPI
148  INetCfgComponentBindings *iface,
149  DWORD dwFlags,
150  INetCfgBindingPath *pncbItemSrc,
151  INetCfgBindingPath *pncbItemDest)
152 {
153  return E_NOTIMPL;
154 }
155 
156 HRESULT
157 WINAPI
159  INetCfgComponentBindings *iface,
160  DWORD dwFlags,
161  INetCfgBindingPath *pncbItemSrc,
162  INetCfgBindingPath *pncbItemDest)
163 {
164  return E_NOTIMPL;
165 }
166 
167 static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings =
168 {
180 };
181 
182 /***************************************************************
183  * INetCfgComponent
184  */
185 
186 HRESULT
187 WINAPI
189  INetCfgComponent * iface,
190  REFIID iid,
191  LPVOID * ppvObj)
192 {
194  *ppvObj = NULL;
195 
196  if (IsEqualIID (iid, &IID_IUnknown) ||
198  {
199  *ppvObj = This;
200  INetCfg_AddRef(iface);
201  return S_OK;
202  }
203  else if (IsEqualIID (iid, &IID_INetCfgComponentBindings))
204  {
205  *ppvObj = (LPVOID)&This->lpVtblComponentBindings;
207  return S_OK;
208  }
209 
210  return E_NOINTERFACE;
211 }
212 
213 ULONG
214 WINAPI
216  INetCfgComponent * iface)
217 {
219  ULONG refCount = InterlockedIncrement(&This->ref);
220 
221  return refCount;
222 }
223 
224 ULONG
225 WINAPI
227  INetCfgComponent * iface)
228 {
230  ULONG refCount = InterlockedDecrement(&This->ref);
231 
232  if (!refCount)
233  {
235  }
236  return refCount;
237 }
238 
239 HRESULT
240 WINAPI
242  INetCfgComponent * iface,
243  LPWSTR * ppszwDisplayName)
244 {
245  LPWSTR szName;
246  UINT Length;
248 
249  if (This == NULL || ppszwDisplayName == NULL)
250  return E_POINTER;
251 
252  if (This->pItem->szDisplayName)
253  Length = wcslen(This->pItem->szDisplayName)+1;
254  else
255  Length = 1;
256 
257  szName = CoTaskMemAlloc(Length * sizeof(WCHAR));
258  if (!szName)
259  return E_OUTOFMEMORY;
260 
261  if (Length > 1)
262  wcscpy(szName, This->pItem->szDisplayName);
263  else
264  szName[0] = L'\0';
265 
266  *ppszwDisplayName = szName;
267 
268  return S_OK;
269 }
270 
271 HRESULT
272 WINAPI
274  INetCfgComponent * iface,
275  LPCWSTR ppszwDisplayName)
276 {
277  LPWSTR szName;
279 
280  if (This == NULL || ppszwDisplayName == NULL)
281  return E_POINTER;
282 
283  /* setting name is only supported for network cards */
284  if (!IsEqualGUID(&This->pItem->ClassGUID, &GUID_DEVCLASS_NET))
285  return E_NOTIMPL;
286 
290 
291  szName = CoTaskMemAlloc((wcslen(ppszwDisplayName)+1) * sizeof(WCHAR));
292  if (!szName)
293  return E_OUTOFMEMORY;
294 
295  wcscpy(szName, ppszwDisplayName);
296  CoTaskMemFree(This->pItem->szDisplayName);
297  This->pItem->szDisplayName = szName;
298  This->pItem->bChanged = TRUE;
299 
300  return S_OK;
301 }
302 
303 HRESULT
304 WINAPI
306  INetCfgComponent * iface,
307  LPWSTR * ppszwHelpText)
308 {
309  LPWSTR szHelp;
310  UINT Length;
312 
313  if (This == NULL || ppszwHelpText == NULL)
314  return E_POINTER;
315 
316  if (This->pItem->szHelpText)
317  Length = wcslen(This->pItem->szHelpText)+1;
318  else
319  Length = 1;
320 
321  szHelp = CoTaskMemAlloc(Length * sizeof(WCHAR));
322  if (!szHelp)
323  return E_OUTOFMEMORY;
324 
325  if (Length > 1)
326  wcscpy(szHelp, This->pItem->szHelpText);
327  else
328  szHelp[0] = L'\0';
329 
330  *ppszwHelpText = szHelp;
331 
332  return S_OK;
333 }
334 
335 HRESULT
336 WINAPI
338  INetCfgComponent * iface,
339  LPWSTR * ppszwId)
340 {
341  LPWSTR szId;
343 
344  if (This == NULL || ppszwId == NULL)
345  return E_POINTER;
346 
347  szId = CoTaskMemAlloc((wcslen(This->pItem->szId)+1) * sizeof(WCHAR));
348  if (!szId)
349  return E_OUTOFMEMORY;
350 
351  wcscpy(szId, This->pItem->szId);
352  *ppszwId = szId;
353 
354  return S_OK;
355 }
356 
357 HRESULT
358 WINAPI
360  INetCfgComponent * iface,
361  DWORD * pdwCharacteristics)
362 {
364 
365  if (This == NULL || pdwCharacteristics == NULL)
366  return E_POINTER;
367 
368  *pdwCharacteristics = This->pItem->dwCharacteristics;
369 
370  return S_OK;
371 }
372 
373 HRESULT
374 WINAPI
376  INetCfgComponent * iface,
377  GUID * pGuid)
378 {
380 
381  if (This == NULL || pGuid == NULL)
382  return E_POINTER;
383 
384  CopyMemory(pGuid, &This->pItem->InstanceId, sizeof(GUID));
385  return S_OK;
386 }
387 
388 HRESULT
389 WINAPI
391  INetCfgComponent * iface,
392  LPWSTR * ppszwDevNodeId)
393 {
394  LPWSTR szNode;
396 
397  if (This == NULL || ppszwDevNodeId == NULL)
398  return E_POINTER;
399 
400  if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
401  return E_NOTIMPL;
402 
403  szNode = CoTaskMemAlloc((wcslen(This->pItem->szNodeId)+1) * sizeof(WCHAR));
404  if (!szNode)
405  return E_OUTOFMEMORY;
406 
407  wcscpy(szNode, This->pItem->szNodeId);
408  *ppszwDevNodeId = szNode;
409  return S_OK;
410 }
411 
412 HRESULT
413 WINAPI
415  INetCfgComponent * iface,
416  GUID * pGuid)
417 {
419 
420  if (This == NULL || pGuid == NULL)
421  return E_POINTER;
422 
423  CopyMemory(pGuid, &This->pItem->ClassGUID, sizeof(GUID));
424  return S_OK;
425 }
426 
427 HRESULT
428 WINAPI
430  INetCfgComponent * iface,
431  LPWSTR * ppszwBindName)
432 {
433  LPWSTR szBind;
435 
436  if (This == NULL || ppszwBindName == NULL)
437  return E_POINTER;
438 
439  szBind = CoTaskMemAlloc((wcslen(This->pItem->szBindName)+1) * sizeof(WCHAR));
440  if (!szBind)
441  return E_OUTOFMEMORY;
442 
443  wcscpy(szBind, This->pItem->szBindName);
444  *ppszwBindName = szBind;
445 
446  return S_OK;
447 }
448 
449 HRESULT
450 WINAPI
452  INetCfgComponent * iface,
453  ULONG * pStatus)
454 {
456 
457  if (This == NULL || pStatus == NULL)
458  return E_POINTER;
459 
460  if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
461  return E_UNEXPECTED;
462 
463  *pStatus = This->pItem->Status;
464 
465  return S_OK;
466 }
467 
468 HRESULT
469 WINAPI
471  INetCfgComponent * iface,
472  HKEY * phkey)
473 {
474  WCHAR szBuffer[200] = L"SYSTEM\\CurrentControlSet\\Services\\";
476 
477  if (This == NULL || phkey == NULL)
478  return E_POINTER;
479 
480  wcscat(szBuffer, This->pItem->szBindName);
481  wcscat(szBuffer, L"\\Parameters");
482 
483  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szBuffer, 0, KEY_READ | KEY_WRITE, phkey) == ERROR_SUCCESS)
484  return S_OK;
485  else
486  return E_FAIL;
487 }
488 
489 
490 HRESULT
493  INetCfgComponent * iface,
494  IUnknown *pUnk)
495 {
496  WCHAR szName[150];
497  HKEY hKey;
498  DWORD dwSize, dwType;
499  GUID CLSID_NotifyObject;
500  LPOLESTR pStr;
501  INetCfgComponentPropertyUi * pNCCPU;
502  INetCfgComponentControl * pNCCC;
503  HRESULT hr;
504  LONG lRet;
506  CLSID InstanceGUID;
507 
508  wcscpy(szName,L"SYSTEM\\CurrentControlSet\\Control\\Network\\");
509 
510  /* get the Class GUID */
512  if (FAILED(hr))
513  return hr;
514 
515  hr = StringFromCLSID(&ClassGUID, &pStr);
516  if (FAILED(hr))
517  return hr;
518 
519  wcscat(szName, pStr);
520  CoTaskMemFree(pStr);
521  wcscat(szName, L"\\");
522 
523  /* get the Instance GUID */
524  hr = INetCfgComponent_GetInstanceGuid(iface, &InstanceGUID);
525  if (FAILED(hr))
526  return hr;
527 
528  hr = StringFromCLSID(&InstanceGUID, &pStr);
529  if (FAILED(hr))
530  return hr;
531 
532  wcscat(szName, pStr);
533  CoTaskMemFree(pStr);
534 
535  wcscat(szName, L"\\NDI");
536 
538  return E_FAIL;
539 
540  dwSize = sizeof(szName);
541  lRet = RegQueryValueExW(hKey, L"ClsID", NULL, &dwType, (LPBYTE)szName, &dwSize);
542  RegCloseKey(hKey);
543 
544  if (lRet != ERROR_SUCCESS && dwType != REG_SZ)
545  return E_FAIL;
546 
547  hr = CLSIDFromString(szName, &CLSID_NotifyObject);
548  if (FAILED(hr))
549  return E_FAIL;
550 
551  hr = CoCreateInstance(&CLSID_NotifyObject, NULL, CLSCTX_INPROC_SERVER, &IID_INetCfgComponentPropertyUi, (LPVOID*)&pNCCPU);
552  if (FAILED(hr))
553  return E_FAIL;
554 
556  if (FAILED(hr))
557  {
559  return hr;
560  }
561 
563  if (FAILED(hr))
564  {
566  return hr;
567  }
568 
569  hr = INetCfgComponentControl_Initialize(pNCCC, iface, This->pNCfg, FALSE);
570  if (FAILED(hr))
571  {
574  return hr;
575  }
576 
578  if (FAILED(hr))
579  {
581  return hr;
582  }
583  This->pProperty = pNCCPU;
584  This->pItem->pNCCC = pNCCC;
585 
586  return S_OK;
587 }
588 
589 static int CALLBACK
591 {
592  // NOTE: This callback is needed to set large icon correctly.
593  HICON hIcon;
594  switch (uMsg)
595  {
596  case PSCB_INITIALIZED:
597  {
599  SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
600  break;
601  }
602  }
603  return 0;
604 }
605 
606 HRESULT
607 WINAPI
609  INetCfgComponent * iface,
611  IN DWORD dwFlags,
612  IN IUnknown *pUnk)
613 {
614  HRESULT hr;
615  DWORD dwDefPages;
616  UINT Pages;
617  PROPSHEETHEADERW pinfo;
618  HPROPSHEETPAGE * hppages;
619  INT_PTR iResult;
621 
622  if (!This->pProperty)
623  {
625  if (FAILED(hr))
626  return hr;
627  }
628 
630  return S_OK;
631 
632  dwDefPages = 0;
633  Pages = 0;
634 
635  hr = INetCfgComponentPropertyUi_MergePropPages(This->pProperty, &dwDefPages, (BYTE**)&hppages, &Pages, hwndParent, NULL);
636  if (FAILED(hr) || !Pages)
637  {
638  return hr;
639  }
640  ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
641  pinfo.dwSize = sizeof(PROPSHEETHEADERW);
642  pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
644  pinfo.u3.phpage = hppages;
645  pinfo.hwndParent = hwndParent;
646  pinfo.nPages = Pages;
648  pinfo.pszCaption = This->pItem->szDisplayName;
650  pinfo.pfnCallback = PropSheetProc;
651 
652  iResult = PropertySheetW(&pinfo);
653  CoTaskMemFree(hppages);
654  if (iResult > 0)
655  {
656  /* indicate that settings should be stored */
657  This->pItem->bChanged = TRUE;
658  return S_OK;
659  }
660  return S_FALSE;
661 }
662 static const INetCfgComponentVtbl vt_NetCfgComponent =
663 {
679 };
680 
681 HRESULT
682 WINAPI
683 INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem, INetCfg * pNCfg)
684 {
686 
687  if (!ppv)
688  return E_POINTER;
689 
691  if (!This)
692  return E_OUTOFMEMORY;
693 
694  This->ref = 1;
695  This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
696  This->lpVtblComponentBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
697  This->pProperty = NULL;
698  This->pItem = pItem;
699  This->pNCfg = pNCfg;
700 
701  if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
702  {
703  INetCfgComponent_Release((INetCfg*)This);
704  return E_NOINTERFACE;
705  }
706 
707  INetCfgComponent_Release((INetCfgComponent*)This);
708  return S_OK;
709 }
710 
711 
712 /***************************************************************
713  * IEnumNetCfgComponent
714  */
715 
716 HRESULT
717 WINAPI
719  IEnumNetCfgComponent * iface,
720  REFIID iid,
721  LPVOID * ppvObj)
722 {
724  *ppvObj = NULL;
725 
726  if (IsEqualIID (iid, &IID_IUnknown) ||
728  {
729  *ppvObj = This;
730  INetCfg_AddRef(iface);
731  return S_OK;
732  }
733 
734  return E_NOINTERFACE;
735 }
736 
737 
738 ULONG
739 WINAPI
741  IEnumNetCfgComponent * iface)
742 {
744  ULONG refCount = InterlockedIncrement(&This->ref);
745 
746  return refCount;
747 }
748 
749 ULONG
750 WINAPI
752  IEnumNetCfgComponent * iface)
753 {
755  ULONG refCount = InterlockedDecrement(&This->ref);
756 
757  return refCount;
758 }
759 
760 HRESULT
761 WINAPI
763  IEnumNetCfgComponent * iface,
764  ULONG celt,
765  INetCfgComponent **rgelt,
766  ULONG *pceltFetched)
767 {
768  HRESULT hr;
770 
771  if (!iface || !rgelt)
772  return E_POINTER;
773 
774  if (celt != 1)
775  return E_INVALIDARG;
776 
777  if (!This->pCurrent)
778  return S_FALSE;
779 
780  hr = INetCfgComponent_Constructor (NULL, &IID_INetCfgComponent, (LPVOID*)rgelt, This->pCurrent, This->pNCfg);
781  if (SUCCEEDED(hr))
782  {
783  This->pCurrent = This->pCurrent->pNext;
784  if (pceltFetched)
785  *pceltFetched = 1;
786  }
787  return hr;
788 }
789 
790 HRESULT
791 WINAPI
793  IEnumNetCfgComponent * iface,
794  ULONG celt)
795 {
797 
798  if (!This->pCurrent)
799  return S_FALSE;
800 
801  while(celt-- > 0 && This->pCurrent)
802  This->pCurrent = This->pCurrent->pNext;
803 
804  if (!celt)
805  return S_OK;
806  else
807  return S_FALSE;
808 }
809 
810 HRESULT
811 WINAPI
813  IEnumNetCfgComponent * iface)
814 {
816 
817  This->pCurrent = This->pHead;
818  return S_OK;
819 }
820 
821 HRESULT
822 WINAPI
824  IEnumNetCfgComponent * iface,
825  IEnumNetCfgComponent **ppenum)
826 {
827  return E_NOTIMPL;
828 }
829 
830 static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent =
831 {
839 };
840 
841 HRESULT
842 WINAPI
844 {
846 
847  if (!ppv)
848  return E_POINTER;
849 
851  if (!This)
852  return E_OUTOFMEMORY;
853 
854  This->ref = 1;
855  This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent;
856  This->pCurrent = pItem;
857  This->pHead = pItem;
858  This->pNCfg = pNCfg;
859 
860  if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
861  {
863  return E_NOINTERFACE;
864  }
865 
866  IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This);
867  return S_OK;
868 }
869 
870 
HWND hwndParent
Definition: prsht.h:277
ULONG WINAPI INetCfgComponentBindings_fnAddRef(INetCfgComponentBindings *iface)
#define IN
Definition: typedefs.h:38
HRESULT WINAPI INetCfgComponentBindings_fnSupportsBindingInterface(INetCfgComponentBindings *iface, DWORD dwFlags, LPCWSTR pszwInterfaceName)
static HICON
Definition: imagelist.c:84
HRESULT WINAPI INetCfgComponent_fnGetDisplayName(INetCfgComponent *iface, LPWSTR *ppszwDisplayName)
#define INetCfgComponent_AddRef(p)
Definition: netcfgx.h:61
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
HRESULT WINAPI INetCfgComponentBindings_fnQueryInterface(INetCfgComponentBindings *iface, REFIID iid, LPVOID *ppvObj)
HRESULT WINAPI INetCfgComponent_fnGetHelpText(INetCfgComponent *iface, LPWSTR *ppszwHelpText)
#define E_NOINTERFACE
Definition: winerror.h:2364
#define INetCfgComponentPropertyUi_MergePropPages(p, a, b, c, d, e)
Definition: netcfgn.h:82
#define PSH_NOAPPLYNOW
Definition: prsht.h:47
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
ULONG WINAPI INetCfgComponentBindings_fnRelease(INetCfgComponentBindings *iface)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define INetCfgComponent_GetClassGuid(p, a)
Definition: netcfgx.h:70
NetCfgComponentItem * pHead
#define KEY_READ
Definition: nt_native.h:1023
HRESULT WINAPI IEnumNetCfgComponent_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, NetCfgComponentItem *pItem, INetCfg *pNCfg)
const INetCfgComponent * lpVtbl
REFIID riid
Definition: precomp.h:44
uint16_t * PWSTR
Definition: typedefs.h:54
HRESULT WINAPI INetCfgComponent_fnOpenParamKey(INetCfgComponent *iface, HKEY *phkey)
ULONG WINAPI INetCfgComponent_fnAddRef(INetCfgComponent *iface)
ULONG WINAPI IEnumNetCfgComponent_fnAddRef(IEnumNetCfgComponent *iface)
#define INetCfgComponentBindings_AddRef(p)
Definition: netcfgx.h:227
#define CALLBACK
Definition: compat.h:27
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI INetCfgComponent_fnSetDisplayName(INetCfgComponent *iface, LPCWSTR ppszwDisplayName)
EXTERN_C const IID IID_IEnumNetCfgBindingPath
Definition: netcfgx.h:192
#define ZeroMemory
Definition: winbase.h:1642
HRESULT WINAPI INetCfgComponent_fnGetInstanceGuid(INetCfgComponent *iface, GUID *pGuid)
ULONG WINAPI IEnumNetCfgComponent_fnRelease(IEnumNetCfgComponent *iface)
struct _PROPSHEETHEADERW PROPSHEETHEADERW
HRESULT WINAPI IEnumNetCfgComponent_fnQueryInterface(IEnumNetCfgComponent *iface, REFIID iid, LPVOID *ppvObj)
int32_t INT_PTR
Definition: typedefs.h:62
#define PSH_USECALLBACK
Definition: prsht.h:48
static LPOLESTR
Definition: stg_prop.c:27
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI INetCfgComponent_fnGetClassGuid(INetCfgComponent *iface, GUID *pGuid)
NetCfgComponentItem * pCurrent
#define INetCfgComponentControl_Initialize(p, a, b, c)
Definition: netcfgn.h:51
HRESULT WINAPI INetCfgComponent_fnQueryInterface(INetCfgComponent *iface, REFIID iid, LPVOID *ppvObj)
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define INetCfgComponentPropertyUi_QueryPropertyUi(p, a)
Definition: netcfgn.h:80
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define PSH_USEICONID
Definition: prsht.h:42
#define UNICODE_NULL
LPCWSTR pszCaption
Definition: prsht.h:283
long LONG
Definition: pedump.c:60
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
static PVOID ptr
Definition: dispmode.c:27
static __inline INetCfgComponentImpl * impl_from_INetCfgComponentBindings(INetCfgComponentBindings *iface)
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:293
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI IEnumNetCfgComponent_fnClone(IEnumNetCfgComponent *iface, IEnumNetCfgComponent **ppenum)
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
HRESULT WINAPI IEnumNetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, DWORD dwFlags)
LONG_PTR LPARAM
Definition: windef.h:208
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
#define INetCfgComponentPropertyUi_Release(p)
Definition: netcfgn.h:79
static const INetCfgComponentVtbl vt_NetCfgComponent
static const WCHAR ClassGUID[]
Definition: devclass.c:30
ULONG WINAPI INetCfgComponent_fnRelease(INetCfgComponent *iface)
#define IEnumNetCfgComponent_Release(p)
Definition: netcfgx.h:259
static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings
#define INetCfgComponentPropertyUi_SetContext(p, a)
Definition: netcfgn.h:81
EXTERN_C const IID IID_INetCfgComponentPropertyUi
Definition: netcfgn.h:88
EXTERN_C const IID IID_INetCfgComponent
Definition: netcfgx.h:77
#define KEY_WRITE
Definition: nt_native.h:1031
HINSTANCE netcfgx_hInstance
Definition: netcfgx.c:15
HRESULT WINAPI IEnumNetCfgComponent_fnSkip(IEnumNetCfgComponent *iface, ULONG celt)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PSH_PROPTITLE
Definition: prsht.h:40
LONG HRESULT
Definition: typedefs.h:77
HINSTANCE hInstance
Definition: prsht.h:278
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:8
#define CopyMemory
Definition: winbase.h:1640
LPCWSTR pszIcon
Definition: prsht.h:281
unsigned long DWORD
Definition: ntddk_ex.h:95
#define INetCfgComponent_Release(p)
Definition: netcfgx.h:62
const IEnumNetCfgComponent * lpVtbl
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
DWORD dwSize
Definition: prsht.h:275
#define LPVOID
Definition: nt_native.h:45
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
DWORD dwFlags
Definition: prsht.h:276
HRESULT WINAPI INetCfgComponentBindings_fnIsBindableTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
HRESULT WINAPI INetCfgComponent_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, NetCfgComponentItem *pItem, INetCfg *pNCfg)
HRESULT WINAPI INetCfgComponent_fnRaisePropertyUi(INetCfgComponent *iface, IN HWND hwndParent, IN DWORD dwFlags, IN IUnknown *pUnk)
static const WCHAR L[]
Definition: oid.c:1250
#define InterlockedDecrement
Definition: armddk.h:52
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
HRESULT WINAPI INetCfgComponentBindings_fnMoveAfter(INetCfgComponentBindings *iface, DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest)
static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent
INetCfgComponentPropertyUi * pProperty
#define IEnumNetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:257
#define IDI_INTERNET
Definition: resource.h:23
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI INetCfgComponentBindings_fnMoveBefore(INetCfgComponentBindings *iface, DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest)
EXTERN_C const IID IID_INetCfgComponentBindings
Definition: netcfgx.h:239
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define INetCfgComponent_GetInstanceGuid(p, a)
Definition: netcfgx.h:68
EXTERN_C const IID IID_INetCfgComponentControl
Definition: netcfgn.h:57
#define INetCfg_AddRef(p)
Definition: netcfgx.h:288
HRESULT WINAPI INetCfgComponentBindings_fnEnumBindingPaths(INetCfgComponentBindings *iface, DWORD dwFlags, IEnumNetCfgBindingPath **ppIEnum)
HICON hIcon
Definition: msconfig.c:44
HRESULT WINAPI IEnumNetCfgComponent_fnReset(IEnumNetCfgComponent *iface)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define E_NOTIMPL
Definition: ddrawi.h:99
EXTERN_C const IID IID_IEnumNetCfgComponent
Definition: netcfgx.h:266
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
HRESULT WINAPI INetCfgComponent_fnGetDeviceStatus(INetCfgComponent *iface, ULONG *pStatus)
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
HRESULT WINAPI INetCfgComponentBindings_fnUnbindFrom(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
const INetCfgComponentBindings * lpVtblComponentBindings
#define E_UNEXPECTED
Definition: winerror.h:2456
HRESULT WINAPI INetCfgComponentBindings_fnBindTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
HRESULT WINAPI INetCfgComponent_fnGetCharacteristics(INetCfgComponent *iface, DWORD *pdwCharacteristics)
static const WCHAR szName[]
Definition: msipriv.h:1194
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
unsigned int ULONG
Definition: retypes.h:1
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
HRESULT WINAPI INetCfgComponent_fnGetBindName(INetCfgComponent *iface, LPWSTR *ppszwBindName)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HRESULT CreateNotificationObject(INetCfgComponentImpl *This, INetCfgComponent *iface, IUnknown *pUnk)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define E_POINTER
Definition: winerror.h:2365
HRESULT WINAPI IEnumNetCfgComponent_fnNext(IEnumNetCfgComponent *iface, ULONG celt, INetCfgComponent **rgelt, ULONG *pceltFetched)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
LPARAM lParam
Definition: combotst.c:139
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
HRESULT WINAPI INetCfgComponent_fnGetId(INetCfgComponent *iface, LPWSTR *ppszwId)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
HRESULT WINAPI INetCfgComponent_fnGetPnpDevNodeId(INetCfgComponent *iface, LPWSTR *ppszwDevNodeId)
#define INetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:60
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define ICON_BIG
Definition: tnclass.cpp:51
#define INetCfgComponentControl_Release(p)
Definition: netcfgn.h:50
#define INetCfgComponentPropertyUi_QueryInterface(p, a, b)
Definition: netcfgn.h:77
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
NetCfgComponentItem * pItem
#define REG_SZ
Definition: layer.c:22
HRESULT WINAPI INetCfgComponentBindings_fnIsBoundTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)