ReactOS 0.4.17-dev-470-gf9e3448
inetcfgcomp_iface.c
Go to the documentation of this file.
1#include "precomp.h"
2
3typedef struct
4{
5 const IEnumNetCfgComponent * lpVtbl;
9 INetCfg * pNCfg;
11
12HRESULT CreateNotifyObject(INetCfgComponentImpl * This, INetCfgComponent * iface);
13
15{
16 return (INetCfgComponentImpl*)((char *)iface - FIELD_OFFSET(INetCfgComponentImpl, lpVtblBindings));
17}
18
20{
21 return (INetCfgComponentImpl*)((char *)iface - FIELD_OFFSET(INetCfgComponentImpl, lpVtblPrivate));
22}
23
24/***************************************************************
25 * INetCfgComponentBindings
26 */
27
31 INetCfgComponentBindings *iface,
32 REFIID iid,
33 LPVOID *ppvObj)
34{
36 return INetCfgComponent_QueryInterface((INetCfgComponent*)This, iid, ppvObj);
37}
38
42 INetCfgComponentBindings *iface)
43{
45 return INetCfgComponent_AddRef((INetCfgComponent*)This);
46}
47
51 INetCfgComponentBindings *iface)
52{
54 return INetCfgComponent_Release((INetCfgComponent*)This);
55}
56
60 INetCfgComponentBindings *iface,
61 INetCfgComponent *pnccItem)
62{
63 return E_NOTIMPL;
64}
65
69 INetCfgComponentBindings *iface,
70 INetCfgComponent *pnccItem)
71{
72 return E_NOTIMPL;
73}
74
78 INetCfgComponentBindings *iface,
80 LPCWSTR pszwInterfaceName)
81{
82 INetCfgComponentImpl *pComponent;
83 PWSTR pszRange, pszStart, pszEnd;
84
85 pComponent = impl_from_INetCfgComponentBindings(iface);
86
87 if (!((dwFlags & NCF_UPPER) || (dwFlags & NCF_LOWER)))
88 return E_INVALIDARG;
89
90 if (!pszwInterfaceName)
91 return E_POINTER;
92
93 pszRange = (dwFlags & NCF_UPPER) ? pComponent->pItem->pszUpperRange : pComponent->pItem->pszLowerRange;
94 TRACE("Range: %S\n", pszRange);
95
96 pszStart = pszRange;
97 for (;;)
98 {
99 pszEnd = wcschr(pszStart, L',');
100 if (pszEnd == NULL)
101 {
102 TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
103 return (_wcsicmp(pszStart, pszwInterfaceName)) ? S_FALSE : S_OK;
104 }
105 else
106 {
107 *pszEnd = UNICODE_NULL;
108 TRACE("%S -- %S\n", pszStart, pszwInterfaceName);
109 if (_wcsicmp(pszStart, pszwInterfaceName) == 0)
110 return S_OK;
111
112 *pszEnd = L',';
113 pszStart = pszEnd + 1;
114 }
115 }
116
117 return S_FALSE;
118}
119
121WINAPI
123 INetCfgComponentBindings *iface,
124 INetCfgComponent *pnccItem)
125{
126 INetCfgComponentImpl *pComponent;
127 PWSTR pszBindName, ptr;
128 INT len;
129
130 pComponent = impl_from_INetCfgComponentBindings(iface);
131 if (pComponent == NULL ||
132 pComponent->pItem == NULL ||
133 pComponent->pItem->pszBinding == NULL)
134 return E_POINTER;
135
136 if (pnccItem == NULL ||
137 ((INetCfgComponentImpl*)pnccItem)->pItem == NULL ||
138 ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName == NULL)
139 return E_POINTER;
140
141 pszBindName = ((INetCfgComponentImpl*)pnccItem)->pItem->szBindName;
142
143 ptr = pComponent->pItem->pszBinding;
144 while (*ptr != UNICODE_NULL)
145 {
146 len = wcslen(ptr);
147
148 if (len > 8 && _wcsicmp(&ptr[8], pszBindName) == 0)
149 return S_OK;
150
151 ptr = ptr + len + 1;
152 }
153
154 return S_FALSE;
155}
156
158WINAPI
160 INetCfgComponentBindings *iface,
161 INetCfgComponent *pnccItem)
162{
163 return E_NOTIMPL;
164}
165
167WINAPI
169 INetCfgComponentBindings *iface,
171 IEnumNetCfgBindingPath **ppIEnum)
172{
174}
175
177WINAPI
179 INetCfgComponentBindings *iface,
181 INetCfgBindingPath *pncbItemSrc,
182 INetCfgBindingPath *pncbItemDest)
183{
184 return E_NOTIMPL;
185}
186
188WINAPI
190 INetCfgComponentBindings *iface,
192 INetCfgBindingPath *pncbItemSrc,
193 INetCfgBindingPath *pncbItemDest)
194{
195 return E_NOTIMPL;
196}
197
198static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings =
199{
211};
212
213/***************************************************************
214 * INetCfgComponentPrivate
215 */
216
218WINAPI
220 INetCfgComponentPrivate *iface,
221 REFIID iid,
222 LPVOID *ppvObj)
223{
225 return INetCfgComponent_QueryInterface((INetCfgComponent*)This, iid, ppvObj);
226}
227
228ULONG
229WINAPI
231 INetCfgComponentPrivate *iface)
232{
234 return INetCfgComponent_AddRef((INetCfgComponent*)This);
235}
236
237ULONG
238WINAPI
240 INetCfgComponentPrivate *iface)
241{
243 return INetCfgComponent_Release((INetCfgComponent*)This);
244}
245
247WINAPI
249 INetCfgComponentPrivate *iface,
250 REFIID iid,
251 LPVOID *ppvObj)
252{
253 HRESULT hr;
254
255 TRACE("INetCfgComponentPrivate_fnUnknown1(%p %s %p)\n", iface, wine_dbgstr_guid(iid), ppvObj);
256
258 hr = CreateNotifyObject(This, (INetCfgComponent*)This);
259 if (FAILED(hr))
260 return hr;
261
262 TRACE("This->pItem %p\n", This->pItem);
263 if (This->pItem)
264 {
265 TRACE("This->pItem->pControl %p\n", This->pItem->pControl);
266 if (This->pItem->pControl)
267 {
268 return INetCfgComponentControl_QueryInterface(This->pItem->pControl, iid, ppvObj);
269 }
270 }
271
272 return S_OK;
273}
274
275static const INetCfgComponentPrivateVtbl vt_NetCfgComponentPrivate =
276{
281};
282
283/***************************************************************
284 * INetCfgComponent
285 */
286
288WINAPI
290 INetCfgComponent * iface,
291 REFIID iid,
292 LPVOID * ppvObj)
293{
295 *ppvObj = NULL;
296
297 if (IsEqualIID (iid, &IID_IUnknown) ||
299 {
300 *ppvObj = This;
301 INetCfg_AddRef(iface);
302 return S_OK;
303 }
305 {
306 *ppvObj = (LPVOID)&This->lpVtblBindings;
308 return S_OK;
309 }
311 {
312 TRACE("IID_INetCfgComponentPrivate\n");
313 *ppvObj = (LPVOID)&This->lpVtblPrivate;
315 return S_OK;
316 }
317
318 return E_NOINTERFACE;
319}
320
321ULONG
322WINAPI
324 INetCfgComponent * iface)
325{
327 ULONG refCount = InterlockedIncrement(&This->ref);
328
329 return refCount;
330}
331
332ULONG
333WINAPI
335 INetCfgComponent * iface)
336{
338 ULONG refCount = InterlockedDecrement(&This->ref);
339
340 if (!refCount)
341 {
343 }
344 return refCount;
345}
346
348WINAPI
350 INetCfgComponent * iface,
351 LPWSTR * ppszwDisplayName)
352{
354 UINT Length;
356
357 if (This == NULL || ppszwDisplayName == NULL)
358 return E_POINTER;
359
360 if (This->pItem->szDisplayName)
361 Length = wcslen(This->pItem->szDisplayName)+1;
362 else
363 Length = 1;
364
365 szName = CoTaskMemAlloc(Length * sizeof(WCHAR));
366 if (!szName)
367 return E_OUTOFMEMORY;
368
369 if (Length > 1)
370 wcscpy(szName, This->pItem->szDisplayName);
371 else
372 szName[0] = L'\0';
373
374 *ppszwDisplayName = szName;
375
376 return S_OK;
377}
378
380WINAPI
382 INetCfgComponent * iface,
383 LPCWSTR ppszwDisplayName)
384{
387
388 if (This == NULL || ppszwDisplayName == NULL)
389 return E_POINTER;
390
391 /* setting name is only supported for network cards */
392 if (!IsEqualGUID(&This->pItem->ClassGUID, &GUID_DEVCLASS_NET))
393 return E_NOTIMPL;
394
398
399 szName = CoTaskMemAlloc((wcslen(ppszwDisplayName)+1) * sizeof(WCHAR));
400 if (!szName)
401 return E_OUTOFMEMORY;
402
403 wcscpy(szName, ppszwDisplayName);
404 CoTaskMemFree(This->pItem->szDisplayName);
405 This->pItem->szDisplayName = szName;
406 This->pItem->bChanged = TRUE;
407
408 return S_OK;
409}
410
412WINAPI
414 INetCfgComponent * iface,
415 LPWSTR * ppszwHelpText)
416{
417 LPWSTR szHelp;
418 UINT Length;
420
421 if (This == NULL || ppszwHelpText == NULL)
422 return E_POINTER;
423
424 if (This->pItem->szHelpText)
425 Length = wcslen(This->pItem->szHelpText)+1;
426 else
427 Length = 1;
428
429 szHelp = CoTaskMemAlloc(Length * sizeof(WCHAR));
430 if (!szHelp)
431 return E_OUTOFMEMORY;
432
433 if (Length > 1)
434 wcscpy(szHelp, This->pItem->szHelpText);
435 else
436 szHelp[0] = L'\0';
437
438 *ppszwHelpText = szHelp;
439
440 return S_OK;
441}
442
444WINAPI
446 INetCfgComponent * iface,
447 LPWSTR * ppszwId)
448{
449 LPWSTR szId;
451
452 if (This == NULL || ppszwId == NULL)
453 return E_POINTER;
454
455 szId = CoTaskMemAlloc((wcslen(This->pItem->szId)+1) * sizeof(WCHAR));
456 if (!szId)
457 return E_OUTOFMEMORY;
458
459 wcscpy(szId, This->pItem->szId);
460 *ppszwId = szId;
461
462 return S_OK;
463}
464
466WINAPI
468 INetCfgComponent * iface,
469 DWORD * pdwCharacteristics)
470{
472
473 if (This == NULL || pdwCharacteristics == NULL)
474 return E_POINTER;
475
476 *pdwCharacteristics = This->pItem->dwCharacteristics;
477
478 return S_OK;
479}
480
482WINAPI
484 INetCfgComponent * iface,
485 GUID * pGuid)
486{
488
489 if (This == NULL || pGuid == NULL)
490 return E_POINTER;
491
492 CopyMemory(pGuid, &This->pItem->InstanceId, sizeof(GUID));
493 return S_OK;
494}
495
497WINAPI
499 INetCfgComponent * iface,
500 LPWSTR * ppszwDevNodeId)
501{
502 LPWSTR szNode;
504
505 if (This == NULL || ppszwDevNodeId == NULL)
506 return E_POINTER;
507
508 if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
509 return E_NOTIMPL;
510
511 szNode = CoTaskMemAlloc((wcslen(This->pItem->szNodeId)+1) * sizeof(WCHAR));
512 if (!szNode)
513 return E_OUTOFMEMORY;
514
515 wcscpy(szNode, This->pItem->szNodeId);
516 *ppszwDevNodeId = szNode;
517 return S_OK;
518}
519
521WINAPI
523 INetCfgComponent * iface,
524 GUID * pGuid)
525{
527
528 if (This == NULL || pGuid == NULL)
529 return E_POINTER;
530
531 CopyMemory(pGuid, &This->pItem->ClassGUID, sizeof(GUID));
532 return S_OK;
533}
534
536WINAPI
538 INetCfgComponent * iface,
539 LPWSTR * ppszwBindName)
540{
541 LPWSTR szBind;
543
544 if (This == NULL || ppszwBindName == NULL)
545 return E_POINTER;
546
547 szBind = CoTaskMemAlloc((wcslen(This->pItem->szBindName)+1) * sizeof(WCHAR));
548 if (!szBind)
549 return E_OUTOFMEMORY;
550
551 wcscpy(szBind, This->pItem->szBindName);
552 *ppszwBindName = szBind;
553
554 return S_OK;
555}
556
558WINAPI
560 INetCfgComponent * iface,
561 ULONG * pStatus)
562{
564
565 if (This == NULL || pStatus == NULL)
566 return E_POINTER;
567
568 if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID))
569 return E_UNEXPECTED;
570
571 *pStatus = This->pItem->Status;
572
573 return S_OK;
574}
575
577WINAPI
579 INetCfgComponent * iface,
580 HKEY * phkey)
581{
582 WCHAR szBuffer[200] = L"SYSTEM\\CurrentControlSet\\Services\\";
584
585 if (This == NULL || phkey == NULL)
586 return E_POINTER;
587
588 wcscat(szBuffer, This->pItem->szBindName);
589 wcscat(szBuffer, L"\\Parameters");
590
591 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szBuffer, 0, KEY_READ | KEY_WRITE, phkey) == ERROR_SUCCESS)
592 return S_OK;
593 else
594 return E_FAIL;
595}
596
597
601 INetCfgComponent *iface)
602{
603 WCHAR szName[150];
604 HKEY hKey;
605 DWORD dwSize, dwType;
606 GUID CLSID_NotifyObject;
607 LPOLESTR pStr;
608 INetCfgComponentControl *pControl;
609 INetCfgComponentPropertyUi *pPropertyUi;
610 INetCfgComponentSetup *pSetup;
611 INetCfgComponentNotifyBinding *pNotifyBinding;
612 INetCfgComponentNotifyGlobal *pNotifyGlobal;
613 INetCfgComponentUpperEdge *pUpperEdge;
614 HRESULT hr;
615 LONG lRet;
617 CLSID InstanceGUID;
618
619 if (This->pItem->pControl)
620 return S_OK;
621
622 wcscpy(szName,L"SYSTEM\\CurrentControlSet\\Control\\Network\\");
623
624 /* get the Class GUID */
626 if (FAILED(hr))
627 return hr;
628
629 hr = StringFromCLSID(&ClassGUID, &pStr);
630 if (FAILED(hr))
631 return hr;
632
633 wcscat(szName, pStr);
634 CoTaskMemFree(pStr);
635 wcscat(szName, L"\\");
636
637 /* get the Instance GUID */
638 hr = INetCfgComponent_GetInstanceGuid(iface, &InstanceGUID);
639 if (FAILED(hr))
640 return hr;
641
642 hr = StringFromCLSID(&InstanceGUID, &pStr);
643 if (FAILED(hr))
644 return hr;
645
646 wcscat(szName, pStr);
647 CoTaskMemFree(pStr);
648
649 wcscat(szName, L"\\NDI");
650
652 return E_FAIL;
653
654 dwSize = sizeof(szName);
655 lRet = RegQueryValueExW(hKey, L"ClsID", NULL, &dwType, (LPBYTE)szName, &dwSize);
657
658 if (lRet != ERROR_SUCCESS && dwType != REG_SZ)
659 return E_FAIL;
660
661 hr = CLSIDFromString(szName, &CLSID_NotifyObject);
662 if (FAILED(hr))
663 return E_FAIL;
664
665 hr = CoCreateInstance(&CLSID_NotifyObject, NULL, CLSCTX_INPROC_SERVER, &IID_INetCfgComponentControl, (LPVOID*)&pControl);
666 if (FAILED(hr))
667 return E_FAIL;
668
669 This->pItem->pControl = pControl;
670
672 if (SUCCEEDED(hr))
673 {
674 This->pItem->pPropertyUi = pPropertyUi;
675 }
676
678 if (SUCCEEDED(hr))
679 {
680 This->pItem->pSetup = pSetup;
681 }
682
684 if (SUCCEEDED(hr))
685 {
686 This->pItem->pNotifyBinding = pNotifyBinding;
687 }
688
690 if (SUCCEEDED(hr))
691 {
692 This->pItem->pNotifyGlobal = pNotifyGlobal;
693 }
694
696 if (SUCCEEDED(hr))
697 {
698 This->pItem->pUpperEdge = pUpperEdge;
699 }
700
701 INetCfgComponentControl_Initialize(pControl, iface, This->pNCfg, FALSE);
702
703 if (This->pItem->pNotifyGlobal)
704 {
706 &This->pItem->dwSupportedNotifications);
707 }
708
709 return S_OK;
710}
711
712static int CALLBACK
714{
715 // NOTE: This callback is needed to set large icon correctly.
716 HICON hIcon;
717 switch (uMsg)
718 {
719 case PSCB_INITIALIZED:
720 {
722 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
723 break;
724 }
725 }
726 return 0;
727}
728
730WINAPI
732 INetCfgComponent * iface,
736{
737 HRESULT hr;
738 DWORD dwDefPages;
739 UINT Pages;
740 PROPSHEETHEADERW pinfo;
741 HPROPSHEETPAGE * hppages;
742 INT_PTR iResult;
744
745 hr = CreateNotifyObject(This, iface);
746 if (FAILED(hr))
747 return hr;
748
749 if (This->pItem->pPropertyUi == NULL)
750 return E_FAIL;
751
753 return INetCfgComponentPropertyUi_QueryPropertyUi(This->pItem->pPropertyUi, pUnk);
754
755 hr = INetCfgComponentPropertyUi_SetContext(This->pItem->pPropertyUi, pUnk);
756
757 dwDefPages = 0;
758 Pages = 0;
759
760 hr = INetCfgComponentPropertyUi_MergePropPages(This->pItem->pPropertyUi, &dwDefPages, (BYTE**)&hppages, &Pages, hwndParent, NULL);
761 if (FAILED(hr) || !Pages)
762 {
763 return hr;
764 }
765 ZeroMemory(&pinfo, sizeof(PROPSHEETHEADERW));
766 pinfo.dwSize = sizeof(PROPSHEETHEADERW);
767 pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW |
769 pinfo.u3.phpage = hppages;
770 pinfo.hwndParent = hwndParent;
771 pinfo.nPages = Pages;
773 pinfo.pszCaption = This->pItem->szDisplayName;
776
777 iResult = PropertySheetW(&pinfo);
778 CoTaskMemFree(hppages);
779 if (iResult > 0)
780 {
782 /* indicate that settings should be stored */
783 if (hr == S_OK)
784 This->pItem->bChanged = TRUE;
785 }
786 else if (iResult == 0)
787 {
789 }
790 else
791 {
792 hr = S_FALSE;
793 }
794
795 INetCfgComponentPropertyUi_SetContext(This->pItem->pPropertyUi, NULL);
796
797 return hr;
798}
799
800static const INetCfgComponentVtbl vt_NetCfgComponent =
801{
817};
818
820WINAPI
822{
824
825 if (!ppv)
826 return E_POINTER;
827
829 if (!This)
830 return E_OUTOFMEMORY;
831
832 This->ref = 1;
833 This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
834 This->lpVtblBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
835 This->lpVtblPrivate = (const INetCfgComponentPrivate*)&vt_NetCfgComponentPrivate;
836 This->pItem = pItem;
837 This->pNCfg = pNCfg;
838
839 if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
840 {
842 return E_NOINTERFACE;
843 }
844
845 INetCfgComponent_Release((INetCfgComponent*)This);
846 return S_OK;
847}
848
849
850/***************************************************************
851 * IEnumNetCfgComponent
852 */
853
855WINAPI
857 IEnumNetCfgComponent * iface,
858 REFIID iid,
859 LPVOID * ppvObj)
860{
862 *ppvObj = NULL;
863
864 if (IsEqualIID (iid, &IID_IUnknown) ||
866 {
867 *ppvObj = This;
868 INetCfg_AddRef(iface);
869 return S_OK;
870 }
871
872 return E_NOINTERFACE;
873}
874
875
876ULONG
877WINAPI
879 IEnumNetCfgComponent * iface)
880{
882 ULONG refCount = InterlockedIncrement(&This->ref);
883
884 return refCount;
885}
886
887ULONG
888WINAPI
890 IEnumNetCfgComponent * iface)
891{
893 ULONG refCount = InterlockedDecrement(&This->ref);
894
895 return refCount;
896}
897
899WINAPI
901 IEnumNetCfgComponent * iface,
902 ULONG celt,
903 INetCfgComponent **rgelt,
904 ULONG *pceltFetched)
905{
906 HRESULT hr;
908
909 if (!iface || !rgelt)
910 return E_POINTER;
911
912 if (celt != 1)
913 return E_INVALIDARG;
914
915 if (!This->pCurrent)
916 return S_FALSE;
917
918 hr = INetCfgComponent_Constructor (NULL, &IID_INetCfgComponent, (LPVOID*)rgelt, This->pCurrent, This->pNCfg);
919 if (SUCCEEDED(hr))
920 {
921 This->pCurrent = This->pCurrent->pNext;
922 if (pceltFetched)
923 *pceltFetched = 1;
924 }
925 return hr;
926}
927
929WINAPI
931 IEnumNetCfgComponent * iface,
932 ULONG celt)
933{
935
936 if (!This->pCurrent)
937 return S_FALSE;
938
939 while(celt-- > 0 && This->pCurrent)
940 This->pCurrent = This->pCurrent->pNext;
941
942 if (!celt)
943 return S_OK;
944 else
945 return S_FALSE;
946}
947
949WINAPI
951 IEnumNetCfgComponent * iface)
952{
954
955 This->pCurrent = This->pHead;
956 return S_OK;
957}
958
960WINAPI
962 IEnumNetCfgComponent * iface,
963 IEnumNetCfgComponent **ppenum)
964{
965 return E_NOTIMPL;
966}
967
968static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent =
969{
977};
978
980WINAPI
982{
984
985 if (!ppv)
986 return E_POINTER;
987
989 if (!This)
990 return E_OUTOFMEMORY;
991
992 This->ref = 1;
993 This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent;
994 This->pCurrent = pItem;
995 This->pHead = pItem;
996 This->pNCfg = pNCfg;
997
998 if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
999 {
1001 return E_NOINTERFACE;
1002 }
1003
1004 IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This);
1005 return S_OK;
1006}
1007
1008
#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:299
#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:582
#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
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
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:164
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
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
unsigned int UINT
Definition: sysinfo.c:13
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
#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
HICON hIcon
Definition: msconfig.c:44
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
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
NetCfgComponentItem * pItem
Definition: precomp.h:87
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