ReactOS 0.4.17-dev-116-ga4b6fe9
inetcfgcomp_iface.c
Go to the documentation of this file.
1#include "precomp.h"
2
3typedef struct
4{
5 const INetCfgComponent *lpVtbl;
6 const INetCfgComponentBindings *lpVtblBindings;
7 const INetCfgComponentPrivate *lpVtblPrivate;
10 INetCfg * pNCfg;
12
13typedef struct
14{
15 const IEnumNetCfgComponent * lpVtbl;
19 INetCfg * pNCfg;
21
22HRESULT CreateNotifyObject(INetCfgComponentImpl * This, INetCfgComponent * iface);
23
25{
26 return (INetCfgComponentImpl*)((char *)iface - FIELD_OFFSET(INetCfgComponentImpl, lpVtblBindings));
27}
28
30{
31 return (INetCfgComponentImpl*)((char *)iface - FIELD_OFFSET(INetCfgComponentImpl, lpVtblPrivate));
32}
33
34/***************************************************************
35 * INetCfgComponentBindings
36 */
37
41 INetCfgComponentBindings *iface,
42 REFIID iid,
43 LPVOID *ppvObj)
44{
46 return INetCfgComponent_QueryInterface((INetCfgComponent*)This, iid, ppvObj);
47}
48
52 INetCfgComponentBindings *iface)
53{
55 return INetCfgComponent_AddRef((INetCfgComponent*)This);
56}
57
61 INetCfgComponentBindings *iface)
62{
64 return INetCfgComponent_Release((INetCfgComponent*)This);
65}
66
70 INetCfgComponentBindings *iface,
71 INetCfgComponent *pnccItem)
72{
73 return E_NOTIMPL;
74}
75
79 INetCfgComponentBindings *iface,
80 INetCfgComponent *pnccItem)
81{
82 return E_NOTIMPL;
83}
84
88 INetCfgComponentBindings *iface,
90 LPCWSTR pszwInterfaceName)
91{
92 INetCfgComponentImpl *pComponent;
93 PWSTR pszRange, pszStart, pszEnd;
94
95 pComponent = impl_from_INetCfgComponentBindings(iface);
96
97 if (!((dwFlags & NCF_UPPER) || (dwFlags & NCF_LOWER)))
98 return E_INVALIDARG;
99
100 if (!pszwInterfaceName)
101 return E_POINTER;
102
103 pszRange = (dwFlags & NCF_UPPER) ? pComponent->pItem->pszUpperRange : pComponent->pItem->pszLowerRange;
104 TRACE("Range: %S\n", pszRange);
105
106 pszStart = pszRange;
107 for (;;)
108 {
109 pszEnd = wcschr(pszStart, L',');
110 if (pszEnd == NULL)
111 {
112 TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
113 return (_wcsicmp(pszStart, pszwInterfaceName)) ? S_FALSE : S_OK;
114 }
115 else
116 {
117 *pszEnd = UNICODE_NULL;
118 TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
119 if (_wcsicmp(pszStart, pszwInterfaceName) == 0)
120 return S_OK;
121
122 *pszEnd = L',';
123 pszStart = pszEnd + 1;
124 }
125 }
126
127 return S_FALSE;
128}
129
131WINAPI
133 INetCfgComponentBindings *iface,
134 INetCfgComponent *pnccItem)
135{
136 INetCfgComponentImpl *pComponent;
137 PWSTR pszBindName, ptr;
138 INT len;
139
140 pComponent = impl_from_INetCfgComponentBindings(iface);
141 if (pComponent == NULL ||
142 pComponent->pItem == NULL ||
143 pComponent->pItem->pszBinding == NULL)
144 return E_POINTER;
145
146 if (pnccItem == NULL ||
147 ((INetCfgComponentImpl*)pnccItem)->pItem == NULL ||
148 ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName == NULL)
149 return E_POINTER;
150
151 pszBindName = ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName;
152
153 ptr = pComponent->pItem->pszBinding;
154 while (*ptr != UNICODE_NULL)
155 {
156 len = wcslen(ptr);
157
158 if (len > 8 && _wcsicmp(&ptr[8], pszBindName) == 0)
159 return S_OK;
160
161 ptr = ptr + len + 1;
162 }
163
164 return S_FALSE;
165}
166
168WINAPI
170 INetCfgComponentBindings *iface,
171 INetCfgComponent *pnccItem)
172{
173 return E_NOTIMPL;
174}
175
177WINAPI
179 INetCfgComponentBindings *iface,
181 IEnumNetCfgBindingPath **ppIEnum)
182{
184}
185
187WINAPI
189 INetCfgComponentBindings *iface,
191 INetCfgBindingPath *pncbItemSrc,
192 INetCfgBindingPath *pncbItemDest)
193{
194 return E_NOTIMPL;
195}
196
198WINAPI
200 INetCfgComponentBindings *iface,
202 INetCfgBindingPath *pncbItemSrc,
203 INetCfgBindingPath *pncbItemDest)
204{
205 return E_NOTIMPL;
206}
207
208static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings =
209{
221};
222
223/***************************************************************
224 * INetCfgComponentPrivate
225 */
226
228WINAPI
230 INetCfgComponentPrivate *iface,
231 REFIID iid,
232 LPVOID *ppvObj)
233{
235 return INetCfgComponent_QueryInterface((INetCfgComponent*)This, iid, ppvObj);
236}
237
238ULONG
239WINAPI
241 INetCfgComponentPrivate *iface)
242{
244 return INetCfgComponent_AddRef((INetCfgComponent*)This);
245}
246
247ULONG
248WINAPI
250 INetCfgComponentPrivate *iface)
251{
253 return INetCfgComponent_Release((INetCfgComponent*)This);
254}
255
257WINAPI
259 INetCfgComponentPrivate *iface,
260 REFIID iid,
261 LPVOID *ppvObj)
262{
263 HRESULT hr;
264
265 TRACE("INetCfgComponentPrivate_fnUnknown1(%p %s %p)\n", iface, wine_dbgstr_guid(iid), ppvObj);
266
268 hr = CreateNotifyObject(This, (INetCfgComponent*)This);
269 if (FAILED(hr))
270 return hr;
271
272 TRACE("This->pItem %p\n", This->pItem);
273 if (This->pItem)
274 {
275 TRACE("This->pItem->pControl %p\n", This->pItem->pControl);
276 if (This->pItem->pControl)
277 {
278 return INetCfgComponentControl_QueryInterface(This->pItem->pControl, iid, ppvObj);
279 }
280 }
281
282 return S_OK;
283}
284
285static const INetCfgComponentPrivateVtbl vt_NetCfgComponentPrivate =
286{
291};
292
293/***************************************************************
294 * INetCfgComponent
295 */
296
298WINAPI
300 INetCfgComponent * iface,
301 REFIID iid,
302 LPVOID * ppvObj)
303{
305 *ppvObj = NULL;
306
307 if (IsEqualIID (iid, &IID_IUnknown) ||
309 {
310 *ppvObj = This;
311 INetCfg_AddRef(iface);
312 return S_OK;
313 }
315 {
316 *ppvObj = (LPVOID)&This->lpVtblBindings;
318 return S_OK;
319 }
321 {
322 TRACE("IID_INetCfgComponentPrivate\n");
323 *ppvObj = (LPVOID)&This->lpVtblPrivate;
325 return S_OK;
326 }
327
328 return E_NOINTERFACE;
329}
330
331ULONG
332WINAPI
334 INetCfgComponent * iface)
335{
337 ULONG refCount = InterlockedIncrement(&This->ref);
338
339 return refCount;
340}
341
342ULONG
343WINAPI
345 INetCfgComponent * iface)
346{
348 ULONG refCount = InterlockedDecrement(&This->ref);
349
350 if (!refCount)
351 {
353 }
354 return refCount;
355}
356
358WINAPI
360 INetCfgComponent * iface,
361 LPWSTR * ppszwDisplayName)
362{
364 UINT Length;
366
367 if (This == NULL || ppszwDisplayName == NULL)
368 return E_POINTER;
369
370 if (This->pItem->szDisplayName)
371 Length = wcslen(This->pItem->szDisplayName)+1;
372 else
373 Length = 1;
374
375 szName = CoTaskMemAlloc(Length * sizeof(WCHAR));
376 if (!szName)
377 return E_OUTOFMEMORY;
378
379 if (Length > 1)
380 wcscpy(szName, This->pItem->szDisplayName);
381 else
382 szName[0] = L'\0';
383
384 *ppszwDisplayName = szName;
385
386 return S_OK;
387}
388
390WINAPI
392 INetCfgComponent * iface,
393 LPCWSTR ppszwDisplayName)
394{
397
398 if (This == NULL || ppszwDisplayName == NULL)
399 return E_POINTER;
400
401 /* setting name is only supported for network cards */
402 if (!IsEqualGUID(&This->pItem->ClassGUID, &GUID_DEVCLASS_NET))
403 return E_NOTIMPL;
404
408
409 szName = CoTaskMemAlloc((wcslen(ppszwDisplayName)+1) * sizeof(WCHAR));
410 if (!szName)
411 return E_OUTOFMEMORY;
412
413 wcscpy(szName, ppszwDisplayName);
414 CoTaskMemFree(This->pItem->szDisplayName);
415 This->pItem->szDisplayName = szName;
416 This->pItem->bChanged = TRUE;
417
418 return S_OK;
419}
420
422WINAPI
424 INetCfgComponent * iface,
425 LPWSTR * ppszwHelpText)
426{
427 LPWSTR szHelp;
428 UINT Length;
430
431 if (This == NULL || ppszwHelpText == NULL)
432 return E_POINTER;
433
434 if (This->pItem->szHelpText)
435 Length = wcslen(This->pItem->szHelpText)+1;
436 else
437 Length = 1;
438
439 szHelp = CoTaskMemAlloc(Length * sizeof(WCHAR));
440 if (!szHelp)
441 return E_OUTOFMEMORY;
442
443 if (Length > 1)
444 wcscpy(szHelp, This->pItem->szHelpText);
445 else
446 szHelp[0] = L'\0';
447
448 *ppszwHelpText = szHelp;
449
450 return S_OK;
451}
452
454WINAPI
456 INetCfgComponent * iface,
457 LPWSTR * ppszwId)
458{
459 LPWSTR szId;
461
462 if (This == NULL || ppszwId == NULL)
463 return E_POINTER;
464
465 szId = CoTaskMemAlloc((wcslen(This->pItem->szId)+1) * sizeof(WCHAR));
466 if (!szId)
467 return E_OUTOFMEMORY;
468
469 wcscpy(szId, This->pItem->szId);
470 *ppszwId = szId;
471
472 return S_OK;
473}
474
476WINAPI
478 INetCfgComponent * iface,
479 DWORD * pdwCharacteristics)
480{
482
483 if (This == NULL || pdwCharacteristics == NULL)
484 return E_POINTER;
485
486 *pdwCharacteristics = This->pItem->dwCharacteristics;
487
488 return S_OK;
489}
490
492WINAPI
494 INetCfgComponent * iface,
495 GUID * pGuid)
496{
498
499 if (This == NULL || pGuid == NULL)
500 return E_POINTER;
501
502 CopyMemory(pGuid, &This->pItem->InstanceId, sizeof(GUID));
503 return S_OK;
504}
505
507WINAPI
509 INetCfgComponent * iface,
510 LPWSTR * ppszwDevNodeId)
511{
512 LPWSTR szNode;
514
515 if (This == NULL || ppszwDevNodeId == NULL)
516 return E_POINTER;
517
518 if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
519 return E_NOTIMPL;
520
521 szNode = CoTaskMemAlloc((wcslen(This->pItem->szNodeId)+1) * sizeof(WCHAR));
522 if (!szNode)
523 return E_OUTOFMEMORY;
524
525 wcscpy(szNode, This->pItem->szNodeId);
526 *ppszwDevNodeId = szNode;
527 return S_OK;
528}
529
531WINAPI
533 INetCfgComponent * iface,
534 GUID * pGuid)
535{
537
538 if (This == NULL || pGuid == NULL)
539 return E_POINTER;
540
541 CopyMemory(pGuid, &This->pItem->ClassGUID, sizeof(GUID));
542 return S_OK;
543}
544
546WINAPI
548 INetCfgComponent * iface,
549 LPWSTR * ppszwBindName)
550{
551 LPWSTR szBind;
553
554 if (This == NULL || ppszwBindName == NULL)
555 return E_POINTER;
556
557 szBind = CoTaskMemAlloc((wcslen(This->pItem->szBindName)+1) * sizeof(WCHAR));
558 if (!szBind)
559 return E_OUTOFMEMORY;
560
561 wcscpy(szBind, This->pItem->szBindName);
562 *ppszwBindName = szBind;
563
564 return S_OK;
565}
566
568WINAPI
570 INetCfgComponent * iface,
571 ULONG * pStatus)
572{
574
575 if (This == NULL || pStatus == NULL)
576 return E_POINTER;
577
578 if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
579 return E_UNEXPECTED;
580
581 *pStatus = This->pItem->Status;
582
583 return S_OK;
584}
585
587WINAPI
589 INetCfgComponent * iface,
590 HKEY * phkey)
591{
592 WCHAR szBuffer[200] = L"SYSTEM\\CurrentControlSet\\Services\\";
594
595 if (This == NULL || phkey == NULL)
596 return E_POINTER;
597
598 wcscat(szBuffer, This->pItem->szBindName);
599 wcscat(szBuffer, L"\\Parameters");
600
601 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szBuffer, 0, KEY_READ | KEY_WRITE, phkey) == ERROR_SUCCESS)
602 return S_OK;
603 else
604 return E_FAIL;
605}
606
607
611 INetCfgComponent *iface)
612{
613 WCHAR szName[150];
614 HKEY hKey;
615 DWORD dwSize, dwType;
616 GUID CLSID_NotifyObject;
617 LPOLESTR pStr;
618 INetCfgComponentControl *pControl;
619 INetCfgComponentPropertyUi *pPropertyUi;
620 INetCfgComponentSetup *pSetup;
621 INetCfgComponentNotifyBinding *pNotifyBinding;
622 INetCfgComponentNotifyGlobal *pNotifyGlobal;
623 INetCfgComponentUpperEdge *pUpperEdge;
624 HRESULT hr;
625 LONG lRet;
627 CLSID InstanceGUID;
628
629 if (This->pItem->pControl)
630 return S_OK;
631
632 wcscpy(szName,L"SYSTEM\\CurrentControlSet\\Control\\Network\\");
633
634 /* get the Class GUID */
636 if (FAILED(hr))
637 return hr;
638
639 hr = StringFromCLSID(&ClassGUID, &pStr);
640 if (FAILED(hr))
641 return hr;
642
643 wcscat(szName, pStr);
644 CoTaskMemFree(pStr);
645 wcscat(szName, L"\\");
646
647 /* get the Instance GUID */
648 hr = INetCfgComponent_GetInstanceGuid(iface, &InstanceGUID);
649 if (FAILED(hr))
650 return hr;
651
652 hr = StringFromCLSID(&InstanceGUID, &pStr);
653 if (FAILED(hr))
654 return hr;
655
656 wcscat(szName, pStr);
657 CoTaskMemFree(pStr);
658
659 wcscat(szName, L"\\NDI");
660
662 return E_FAIL;
663
664 dwSize = sizeof(szName);
665 lRet = RegQueryValueExW(hKey, L"ClsID", NULL, &dwType, (LPBYTE)szName, &dwSize);
667
668 if (lRet != ERROR_SUCCESS && dwType != REG_SZ)
669 return E_FAIL;
670
671 hr = CLSIDFromString(szName, &CLSID_NotifyObject);
672 if (FAILED(hr))
673 return E_FAIL;
674
675 hr = CoCreateInstance(&CLSID_NotifyObject, NULL, CLSCTX_INPROC_SERVER, &IID_INetCfgComponentControl, (LPVOID*)&pControl);
676 if (FAILED(hr))
677 return E_FAIL;
678
679 This->pItem->pControl = pControl;
680
682 if (SUCCEEDED(hr))
683 {
684 This->pItem->pPropertyUi = pPropertyUi;
685 }
686
688 if (SUCCEEDED(hr))
689 {
690 This->pItem->pSetup = pSetup;
691 }
692
694 if (SUCCEEDED(hr))
695 {
696 This->pItem->pNotifyBinding = pNotifyBinding;
697 }
698
700 if (SUCCEEDED(hr))
701 {
702 This->pItem->pNotifyGlobal = pNotifyGlobal;
703 }
704
706 if (SUCCEEDED(hr))
707 {
708 This->pItem->pUpperEdge = pUpperEdge;
709 }
710
711 INetCfgComponentControl_Initialize(pControl, iface, This->pNCfg, FALSE);
712
713 if (This->pItem->pNotifyGlobal)
714 {
716 &This->pItem->dwSupportedNotifications);
717 }
718
719 return S_OK;
720}
721
722static int CALLBACK
724{
725 // NOTE: This callback is needed to set large icon correctly.
726 HICON hIcon;
727 switch (uMsg)
728 {
729 case PSCB_INITIALIZED:
730 {
732 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
733 break;
734 }
735 }
736 return 0;
737}
738
740WINAPI
742 INetCfgComponent * iface,
746{
747 HRESULT hr;
748 DWORD dwDefPages;
749 UINT Pages;
750 PROPSHEETHEADERW pinfo;
751 HPROPSHEETPAGE * hppages;
752 INT_PTR iResult;
754
755 hr = CreateNotifyObject(This, iface);
756 if (FAILED(hr))
757 return hr;
758
759 if (This->pItem->pPropertyUi == NULL)
760 return E_FAIL;
761
763 return INetCfgComponentPropertyUi_QueryPropertyUi(This->pItem->pPropertyUi, pUnk);
764
765 hr = INetCfgComponentPropertyUi_SetContext(This->pItem->pPropertyUi, pUnk);
766
767 dwDefPages = 0;
768 Pages = 0;
769
770 hr = INetCfgComponentPropertyUi_MergePropPages(This->pItem->pPropertyUi, &dwDefPages, (BYTE**)&hppages, &Pages, hwndParent, NULL);
771 if (FAILED(hr) || !Pages)
772 {
773 return hr;
774 }
775 ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
776 pinfo.dwSize = sizeof(PROPSHEETHEADERW);
777 pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
779 pinfo.u3.phpage = hppages;
780 pinfo.hwndParent = hwndParent;
781 pinfo.nPages = Pages;
783 pinfo.pszCaption = This->pItem->szDisplayName;
786
787 iResult = PropertySheetW(&pinfo);
788 CoTaskMemFree(hppages);
789 if (iResult > 0)
790 {
792 /* indicate that settings should be stored */
793 if (hr == S_OK)
794 This->pItem->bChanged = TRUE;
795 }
796 else if (iResult == 0)
797 {
799 }
800 else
801 {
802 hr = S_FALSE;
803 }
804
805 INetCfgComponentPropertyUi_SetContext(This->pItem->pPropertyUi, NULL);
806
807 return hr;
808}
809
810static const INetCfgComponentVtbl vt_NetCfgComponent =
811{
827};
828
830WINAPI
832{
834
835 if (!ppv)
836 return E_POINTER;
837
839 if (!This)
840 return E_OUTOFMEMORY;
841
842 This->ref = 1;
843 This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
844 This->lpVtblBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
845 This->lpVtblPrivate = (const INetCfgComponentPrivate*)&vt_NetCfgComponentPrivate;
846 This->pItem = pItem;
847 This->pNCfg = pNCfg;
848
849 if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
850 {
852 return E_NOINTERFACE;
853 }
854
855 INetCfgComponent_Release((INetCfgComponent*)This);
856 return S_OK;
857}
858
859
860/***************************************************************
861 * IEnumNetCfgComponent
862 */
863
865WINAPI
867 IEnumNetCfgComponent * iface,
868 REFIID iid,
869 LPVOID * ppvObj)
870{
872 *ppvObj = NULL;
873
874 if (IsEqualIID (iid, &IID_IUnknown) ||
876 {
877 *ppvObj = This;
878 INetCfg_AddRef(iface);
879 return S_OK;
880 }
881
882 return E_NOINTERFACE;
883}
884
885
886ULONG
887WINAPI
889 IEnumNetCfgComponent * iface)
890{
892 ULONG refCount = InterlockedIncrement(&This->ref);
893
894 return refCount;
895}
896
897ULONG
898WINAPI
900 IEnumNetCfgComponent * iface)
901{
903 ULONG refCount = InterlockedDecrement(&This->ref);
904
905 return refCount;
906}
907
909WINAPI
911 IEnumNetCfgComponent * iface,
912 ULONG celt,
913 INetCfgComponent **rgelt,
914 ULONG *pceltFetched)
915{
916 HRESULT hr;
918
919 if (!iface || !rgelt)
920 return E_POINTER;
921
922 if (celt != 1)
923 return E_INVALIDARG;
924
925 if (!This->pCurrent)
926 return S_FALSE;
927
928 hr = INetCfgComponent_Constructor (NULL, &IID_INetCfgComponent, (LPVOID*)rgelt, This->pCurrent, This->pNCfg);
929 if (SUCCEEDED(hr))
930 {
931 This->pCurrent = This->pCurrent->pNext;
932 if (pceltFetched)
933 *pceltFetched = 1;
934 }
935 return hr;
936}
937
939WINAPI
941 IEnumNetCfgComponent * iface,
942 ULONG celt)
943{
945
946 if (!This->pCurrent)
947 return S_FALSE;
948
949 while(celt-- > 0 && This->pCurrent)
950 This->pCurrent = This->pCurrent->pNext;
951
952 if (!celt)
953 return S_OK;
954 else
955 return S_FALSE;
956}
957
959WINAPI
961 IEnumNetCfgComponent * iface)
962{
964
965 This->pCurrent = This->pHead;
966 return S_OK;
967}
968
970WINAPI
972 IEnumNetCfgComponent * iface,
973 IEnumNetCfgComponent **ppenum)
974{
975 return E_NOTIMPL;
976}
977
978static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent =
979{
987};
988
990WINAPI
992{
994
995 if (!ppv)
996 return E_POINTER;
997
999 if (!This)
1000 return E_OUTOFMEMORY;
1001
1002 This->ref = 1;
1003 This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent;
1004 This->pCurrent = pItem;
1005 This->pHead = pItem;
1006 This->pNCfg = pNCfg;
1007
1008 if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
1009 {
1011 return E_NOINTERFACE;
1012 }
1013
1014 IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This);
1015 return S_OK;
1016}
1017
1018
#define __inline
Definition: _wctype.cpp:15
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define IDI_INTERNET
Definition: resource.h:23
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
HRESULT hr
Definition: delayimp.cpp:573
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
HRESULT WINAPI StringFromCLSID(REFCLSID clsid, LPOLESTR *str)
Definition: combase.c:1515
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
Definition: combase.c:1470
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2916
#define wcschr
Definition: compat.h:17
#define CALLBACK
Definition: compat.h:35
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:159
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
HINSTANCE netcfgx_hInstance
Definition: netcfgx.c:15
static const WCHAR ClassGUID[]
Definition: devclass.c:30
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
__in WDFDMATRANSACTION __out NTSTATUS * pStatus
FxAutoRegKey hKey
GLenum GLsizei len
Definition: glext.h:6722
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI INetCfgComponentBindings_fnBindTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
HRESULT WINAPI IEnumNetCfgComponent_fnClone(IEnumNetCfgComponent *iface, IEnumNetCfgComponent **ppenum)
ULONG WINAPI INetCfgComponentBindings_fnRelease(INetCfgComponentBindings *iface)
HRESULT WINAPI IEnumNetCfgComponent_fnQueryInterface(IEnumNetCfgComponent *iface, REFIID iid, LPVOID *ppvObj)
static __inline INetCfgComponentImpl * impl_from_INetCfgComponentPrivate(INetCfgComponentPrivate *iface)
static __inline INetCfgComponentImpl * impl_from_INetCfgComponentBindings(INetCfgComponentBindings *iface)
HRESULT WINAPI INetCfgComponentBindings_fnIsBoundTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
HRESULT WINAPI INetCfgComponentBindings_fnEnumBindingPaths(INetCfgComponentBindings *iface, DWORD dwFlags, IEnumNetCfgBindingPath **ppIEnum)
HRESULT WINAPI INetCfgComponent_fnGetDisplayName(INetCfgComponent *iface, LPWSTR *ppszwDisplayName)
ULONG WINAPI IEnumNetCfgComponent_fnRelease(IEnumNetCfgComponent *iface)
HRESULT WINAPI INetCfgComponent_fnGetInstanceGuid(INetCfgComponent *iface, GUID *pGuid)
HRESULT WINAPI INetCfgComponentPrivate_fnQueryInterface(INetCfgComponentPrivate *iface, REFIID iid, LPVOID *ppvObj)
HRESULT WINAPI INetCfgComponentPrivate_fnUnknown1(INetCfgComponentPrivate *iface, REFIID iid, LPVOID *ppvObj)
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent
HRESULT WINAPI INetCfgComponent_fnGetDeviceStatus(INetCfgComponent *iface, ULONG *pStatus)
HRESULT WINAPI INetCfgComponentBindings_fnIsBindableTo(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
HRESULT WINAPI INetCfgComponent_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, NetCfgComponentItem *pItem, INetCfg *pNCfg)
ULONG WINAPI INetCfgComponent_fnRelease(INetCfgComponent *iface)
HRESULT WINAPI INetCfgComponentBindings_fnQueryInterface(INetCfgComponentBindings *iface, REFIID iid, LPVOID *ppvObj)
HRESULT WINAPI INetCfgComponentBindings_fnMoveAfter(INetCfgComponentBindings *iface, DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest)
HRESULT WINAPI INetCfgComponent_fnGetCharacteristics(INetCfgComponent *iface, DWORD *pdwCharacteristics)
HRESULT CreateNotifyObject(INetCfgComponentImpl *This, INetCfgComponent *iface)
HRESULT WINAPI INetCfgComponent_fnQueryInterface(INetCfgComponent *iface, REFIID iid, LPVOID *ppvObj)
static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings
HRESULT WINAPI IEnumNetCfgComponent_fnReset(IEnumNetCfgComponent *iface)
HRESULT WINAPI INetCfgComponent_fnGetPnpDevNodeId(INetCfgComponent *iface, LPWSTR *ppszwDevNodeId)
HRESULT WINAPI INetCfgComponentBindings_fnSupportsBindingInterface(INetCfgComponentBindings *iface, DWORD dwFlags, LPCWSTR pszwInterfaceName)
HRESULT WINAPI INetCfgComponent_fnGetId(INetCfgComponent *iface, LPWSTR *ppszwId)
static const INetCfgComponentVtbl vt_NetCfgComponent
ULONG WINAPI INetCfgComponentPrivate_fnRelease(INetCfgComponentPrivate *iface)
ULONG WINAPI INetCfgComponentPrivate_fnAddRef(INetCfgComponentPrivate *iface)
ULONG WINAPI INetCfgComponentBindings_fnAddRef(INetCfgComponentBindings *iface)
HRESULT WINAPI IEnumNetCfgComponent_fnNext(IEnumNetCfgComponent *iface, ULONG celt, INetCfgComponent **rgelt, ULONG *pceltFetched)
HRESULT WINAPI INetCfgComponent_fnGetBindName(INetCfgComponent *iface, LPWSTR *ppszwBindName)
ULONG WINAPI INetCfgComponent_fnAddRef(INetCfgComponent *iface)
HRESULT WINAPI IEnumNetCfgComponent_fnSkip(IEnumNetCfgComponent *iface, ULONG celt)
HRESULT WINAPI IEnumNetCfgComponent_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)
HRESULT WINAPI INetCfgComponent_fnGetClassGuid(INetCfgComponent *iface, GUID *pGuid)
HRESULT WINAPI INetCfgComponent_fnSetDisplayName(INetCfgComponent *iface, LPCWSTR ppszwDisplayName)
HRESULT WINAPI INetCfgComponent_fnGetHelpText(INetCfgComponent *iface, LPWSTR *ppszwHelpText)
HRESULT WINAPI INetCfgComponentBindings_fnMoveBefore(INetCfgComponentBindings *iface, DWORD dwFlags, INetCfgBindingPath *pncbItemSrc, INetCfgBindingPath *pncbItemDest)
ULONG WINAPI IEnumNetCfgComponent_fnAddRef(IEnumNetCfgComponent *iface)
static const INetCfgComponentPrivateVtbl vt_NetCfgComponentPrivate
HRESULT WINAPI INetCfgComponent_fnOpenParamKey(INetCfgComponent *iface, HKEY *phkey)
HRESULT WINAPI INetCfgComponentBindings_fnUnbindFrom(INetCfgComponentBindings *iface, INetCfgComponent *pnccItem)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define REG_SZ
Definition: layer.c:22
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
#define ZeroMemory
Definition: minwinbase.h:31
#define CopyMemory
Definition: minwinbase.h:29
LONG_PTR LPARAM
Definition: minwindef.h:175
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static PVOID ptr
Definition: dispmode.c:27
static HICON
Definition: imagelist.c:80
static BSTR *static LPOLESTR
Definition: varformat.c:44
HICON hIcon
Definition: msconfig.c:44
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI IEnumNetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, DWORD dwFlags)
#define INetCfgComponentPropertyUi_SetContext(p, a)
Definition: netcfgn.h:81
EXTERN_C const IID IID_INetCfgComponentPropertyUi
Definition: netcfgn.h:88
EXTERN_C const IID IID_INetCfgComponentNotifyBinding
Definition: netcfgn.h:111
EXTERN_C const IID IID_INetCfgComponentControl
Definition: netcfgn.h:57
EXTERN_C const IID IID_INetCfgComponentNotifyGlobal
Definition: netcfgn.h:138
#define INetCfgComponentControl_Initialize(p, a, b, c)
Definition: netcfgn.h:51
#define INetCfgComponentControl_QueryInterface(p, a, b)
Definition: netcfgn.h:48
#define INetCfgComponentPropertyUi_QueryPropertyUi(p, a)
Definition: netcfgn.h:80
#define INetCfgComponentPropertyUi_ApplyProperties(p)
Definition: netcfgn.h:84
EXTERN_C const IID IID_INetCfgComponentUpperEdge
Definition: netcfgn.h:213
EXTERN_C const IID IID_INetCfgComponentSetup
Definition: netcfgn.h:165
#define INetCfgComponentNotifyGlobal_GetSupportedNotifications(p, a)
Definition: netcfgn.h:132
#define INetCfgComponentPropertyUi_CancelProperties(p)
Definition: netcfgn.h:85
#define INetCfgComponentPropertyUi_MergePropPages(p, a, b, c, d, e)
Definition: netcfgn.h:82
#define INetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:60
#define INetCfgComponent_Release(p)
Definition: netcfgx.h:62
#define INetCfgComponent_GetClassGuid(p, a)
Definition: netcfgx.h:70
EXTERN_C const IID IID_INetCfgComponentBindings
Definition: netcfgx.h:239
@ NCF_UPPER
Definition: netcfgx.h:197
@ NCF_LOWER
Definition: netcfgx.h:196
@ NCRP_QUERY_PROPERTY_UI
Definition: netcfgx.h:31
EXTERN_C const IID IID_INetCfgComponent
Definition: netcfgx.h:77
#define INetCfgComponentBindings_AddRef(p)
Definition: netcfgx.h:227
#define INetCfg_AddRef(p)
Definition: netcfgx.h:288
#define INetCfgComponent_GetInstanceGuid(p, a)
Definition: netcfgx.h:68
#define INetCfgComponent_AddRef(p)
Definition: netcfgx.h:61
EXTERN_C const IID IID_IEnumNetCfgBindingPath
Definition: netcfgx.h:192
EXTERN_C const IID IID_IEnumNetCfgComponent
Definition: netcfgx.h:266
#define IEnumNetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:257
#define IEnumNetCfgComponent_Release(p)
Definition: netcfgx.h:259
#define INetCfgComponentPrivate_AddRef(p)
Definition: netcfgx_undoc.h:21
EXTERN_C const IID IID_INetCfgComponentPrivate
Definition: netcfgx_undoc.h:16
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define KEY_READ
Definition: nt_native.h:1026
#define LPVOID
Definition: nt_native.h:45
#define KEY_WRITE
Definition: nt_native.h:1034
#define UNICODE_NULL
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
static const WCHAR szName[]
Definition: powrprof.c:45
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PSH_USEICONID
Definition: prsht.h:42
#define PSCB_INITIALIZED
Definition: prsht.h:75
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSH_NOAPPLYNOW
Definition: prsht.h:47
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
wcscat
wcscpy
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:171
#define TRACE(s)
Definition: solgame.cpp:4
NetCfgComponentItem * pHead
const IEnumNetCfgComponent * lpVtbl
NetCfgComponentItem * pCurrent
const INetCfgComponentBindings * lpVtblBindings
const INetCfgComponent * lpVtbl
NetCfgComponentItem * pItem
const INetCfgComponentPrivate * lpVtblPrivate
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
HWND hwndParent
Definition: prsht.h:295
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
HPROPSHEETPAGE * phpage
Definition: prsht.h:309
LPCWSTR pszCaption
Definition: prsht.h:301
#define ICON_BIG
Definition: tnclass.cpp:51
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * LPCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_UNEXPECTED
Definition: winerror.h:3528
#define E_POINTER
Definition: winerror.h:3480
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2444
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned char BYTE
Definition: xxhash.c:193