ReactOS 0.4.16-dev-122-g325d74c
lanconnectui.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Shell
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: CNetConnectionPropertyUi: Network connection configuration dialog
5 * COPYRIGHT: Copyright 2008 Johannes Anderwald (johannes.anderwald@reactos.org)
6 */
7
8#include "precomp.h"
9
11 m_pProperties(NULL)
12{
13}
14
16{
17 if (m_pNCfg)
18 m_pNCfg->Uninitialize();
19
20 // Note: MSDN says we can only unlock after INetCfg::Uninitialize
21 if (m_NCfgLock)
22 m_NCfgLock->ReleaseWriteLock();
23
24 if (m_pProperties)
26}
27
28VOID
30{
31 LVITEMW lvItem;
32
34 lvItem.pszText = szName;
35 lvItem.lParam = (LPARAM)pItem;
36 lvItem.iImage = Image;
37 lvItem.iItem = 0x7fffffff; // Append at the end of the list.
38 lvItem.iSubItem = 0;
39 lvItem.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem);
40 ListView_SetCheckState(hDlgCtrl, lvItem.iItem, bChecked);
41}
42
43BOOL
44CNetConnectionPropertyUi::GetINetCfgComponent(INetCfg *pNCfg, INetCfgComponent ** pOut)
45{
47 HRESULT hr;
48 ULONG Fetched;
50
51 hr = pNCfg->EnumComponents(&GUID_DEVCLASS_NET, &pEnumCfg);
53 return FALSE;
54
55 while (TRUE)
56 {
58 hr = pEnumCfg->Next(1, &pNCg, &Fetched);
59 if (hr != S_OK)
60 break;
61
62 hr = pNCg->GetDisplayName(&pName);
63 if (SUCCEEDED(hr))
64 {
66 {
67 *pOut = pNCg.Detach();
68 return TRUE;
69 }
71 }
72 }
73 return FALSE;
74}
75
76VOID
77CNetConnectionPropertyUi::EnumComponents(HWND hDlgCtrl, INetCfg *pNCfg, const GUID *CompGuid, UINT Type, PSP_CLASSIMAGELIST_DATA pCILD)
78{
79 HRESULT hr;
81 ULONG Num;
82 DWORD dwCharacteristics;
83 LPOLESTR pDisplayName, pHelpText;
84 PNET_ITEM pItem;
85 BOOL bChecked;
86
87 hr = pNCfg->EnumComponents(CompGuid, &pENetCfg);
89 return;
90
91 while (TRUE)
92 {
95 CComPtr<INetCfgComponent> pAdapterCfgComp;
96
97 hr = pENetCfg->Next(1, &pNCfgComp, &Num);
98 if (hr != S_OK)
99 break;
100
101 hr = pNCfgComp->GetCharacteristics(&dwCharacteristics);
102 if (SUCCEEDED(hr) && (dwCharacteristics & NCF_HIDDEN))
103 continue;
104
105 pDisplayName = NULL;
106 pHelpText = NULL;
107 hr = pNCfgComp->GetDisplayName(&pDisplayName);
108 hr = pNCfgComp->GetHelpText(&pHelpText);
109 bChecked = FALSE;
110 hr = pNCfgComp->QueryInterface(IID_PPV_ARG(INetCfgComponentBindings, &pCompBind));
111 if (SUCCEEDED(hr))
112 {
113 if (GetINetCfgComponent(pNCfg, &pAdapterCfgComp))
114 {
115 hr = pCompBind->IsBoundTo(pAdapterCfgComp);
116 if (hr == S_OK)
117 bChecked = TRUE;
118 }
119 }
120
121 pItem = static_cast<NET_ITEM*>(CoTaskMemAlloc(sizeof(NET_ITEM)));
122 if (!pItem)
123 continue;
124
125 pItem->dwCharacteristics = dwCharacteristics;
126 pItem->szHelp = pHelpText;
127 pItem->Type = (NET_TYPE)Type;
128 pItem->pNCfgComp = pNCfgComp.Detach();
129 pItem->NumPropDialogOpen = 0;
130
131 INT image;
132 if (!pCILD->ImageList || !SetupDiGetClassImageIndex(pCILD, CompGuid, &image))
134 AddItemToListView(hDlgCtrl, pItem, pDisplayName, bChecked, image);
135 CoTaskMemFree(pDisplayName);
136 }
137}
138
139VOID
141{
142 HRESULT hr;
143 CComPtr<INetCfg> pNCfg;
144 CComPtr<INetCfgLock> pNCfgLock;
145 HWND hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST);
146 LVCOLUMNW lc;
147 RECT rc;
148 DWORD dwStyle;
149 LPWSTR pDisplayName;
150
153 {
154 /* check show item on taskbar*/
156 }
158 {
159 /* check notify item */
161 }
162
163 memset(&lc, 0, sizeof(LV_COLUMN));
165 lc.fmt = LVCFMT_FIXED_WIDTH;
166 if (GetClientRect(hDlgCtrl, &rc))
167 {
168 lc.mask |= LVCF_WIDTH;
169 lc.cx = rc.right - rc.left;
170 }
171 lc.pszText = (LPWSTR)L"";
172 (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc);
173 dwStyle = (DWORD) SendMessage(hDlgCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
174 dwStyle = dwStyle | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES;
175 SendMessage(hDlgCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
176
177 hr = CoCreateInstance(CLSID_CNetCfg, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(INetCfg, &pNCfg));
178 if (FAILED(hr))
179 return;
180
181 hr = pNCfg->QueryInterface(IID_PPV_ARG(INetCfgLock, &pNCfgLock));
182 hr = pNCfgLock->AcquireWriteLock(100, L"", &pDisplayName);
183 if (hr == S_FALSE)
184 {
185 CoTaskMemFree(pDisplayName);
186 return;
187 }
188
189 hr = pNCfg->Initialize(NULL);
191 {
192 pNCfgLock->ReleaseWriteLock();
193 return;
194 }
195
196 m_pNCfg = pNCfg;
197 m_NCfgLock = pNCfgLock;
198
200 spcid.cbSize = sizeof(spcid);
201 if (SetupDiGetClassImageList(&spcid))
202 {
204 ListView_SetImageList(hDlgCtrl, hIL, LVSIL_SMALL);
205 }
206 else
207 {
208 spcid.ImageList = NULL;
209 }
210
211 EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETCLIENT, NET_TYPE_CLIENT, &spcid);
212 EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETSERVICE, NET_TYPE_SERVICE, &spcid);
213 EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETTRANS, NET_TYPE_PROTOCOL, &spcid);
214
215 if (spcid.ImageList)
217
219}
220
221VOID
223{
224 LVITEMW lvItem;
225 HWND hDlgCtrl;
227 HRESULT hr;
228 INetCfgComponent *pNCfgComp;
229 PNET_ITEM pItem;
230
231 hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST);
232 Count = ListView_GetItemCount(hDlgCtrl);
233 if (!Count)
234 return;
235
236 ZeroMemory(&lvItem, sizeof(LVITEMW));
237 lvItem.mask = LVIF_PARAM | LVIF_STATE;
238 lvItem.stateMask = (UINT)-1;
239 for (Index = 0; Index < Count; Index++)
240 {
241 lvItem.iItem = Index;
242 if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&lvItem))
243 {
244 if (lvItem.state & LVIS_SELECTED)
245 break;
246 }
247 }
248
249 if (!(lvItem.state & LVIS_SELECTED))
250 {
251 return;
252 }
253
254 pItem = (PNET_ITEM)lvItem.lParam;
255 pNCfgComp = (INetCfgComponent*)pItem->pNCfgComp;
256 hr = pNCfgComp->RaisePropertyUi(GetParent(hwndDlg), NCRP_QUERY_PROPERTY_UI, (INetConnectionConnectUi*)this);
257 if (SUCCEEDED(hr))
258 {
259 hr = pNCfgComp->RaisePropertyUi(GetParent(hwndDlg), NCRP_SHOW_PROPERTY_UI, (INetConnectionConnectUi*)this);
260 }
261}
262
266 HWND hwndDlg,
267 UINT uMsg,
270{
272 LPNMLISTVIEW lppl;
273 LVITEMW li;
274 PNET_ITEM pItem;
276 LPPSHNOTIFY lppsn;
277 DWORD dwShowIcon, dwNotifyDisconnect;
278 HRESULT hr;
279 WCHAR szKey[200];
280 LPOLESTR pStr;
281 HKEY hKey;
282
283 switch (uMsg)
284 {
285 case WM_INITDIALOG:
288 This->InitializeLANPropertiesUIDlg(hwndDlg);
290 return TRUE;
291 case WM_NOTIFY:
292 lppl = (LPNMLISTVIEW) lParam;
293 lppsn = (LPPSHNOTIFY) lParam;
294 if (lppsn->hdr.code == PSN_APPLY)
295 {
297 if (This->m_pNCfg)
298 {
299 hr = This->m_pNCfg->Apply();
300 if (FAILED(hr))
301 return PSNRET_INVALID;
302 }
303
305 dwShowIcon = 1;
306 else
307 dwShowIcon = 0;
308
310 dwNotifyDisconnect = 1;
311 else
312 dwNotifyDisconnect = 0;
313
314 //NOTE: Windows write these setting with the undocumented INetLanConnection::SetInfo
315 if (StringFromCLSID((CLSID)This->m_pProperties->guidId, &pStr) == ERROR_SUCCESS)
316 {
317 swprintf(szKey, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pStr);
318 CoTaskMemFree(pStr);
320 {
321 RegSetValueExW(hKey, L"ShowIcon", 0, REG_DWORD, (LPBYTE)&dwShowIcon, sizeof(DWORD));
322 RegSetValueExW(hKey, L"IpCheckingEnabled", 0, REG_DWORD, (LPBYTE)&dwNotifyDisconnect, sizeof(DWORD));
324 }
325 }
326
327 return PSNRET_NOERROR;
328 }
329#if 0
330 else if (lppsn->hdr.code == PSN_CANCEL)
331 {
333 if (This->m_pNCfg)
334 {
335 hr = This->m_pNCfg->Cancel();
336 if (SUCCEEDED(hr))
337 return PSNRET_NOERROR;
338 else
339 return PSNRET_INVALID;
340 }
341 return PSNRET_NOERROR;
342 }
343#endif
344 if (lppl->hdr.code == NM_DBLCLK)
345 {
347 This->ShowNetworkComponentProperties(hwndDlg);
348 return FALSE;
349 }
350
351 if (lppl->hdr.code == LVN_ITEMCHANGING)
352 {
353 ZeroMemory(&li, sizeof(li));
354 li.mask = LVIF_PARAM;
355 li.iItem = lppl->iItem;
356 if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&li))
357 return TRUE;
358
359 pItem = (PNET_ITEM)li.lParam;
360 if (!pItem)
361 return TRUE;
362
363 if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED))
364 {
365 /* new focused item */
368 else
370
371 if (pItem->dwCharacteristics & NCF_HAS_UI)
373 else
375
377 }
378 }
379 break;
380 case WM_COMMAND:
382 {
384 This->ShowNetworkComponentProperties(hwndDlg);
385 return FALSE;
386 }
387 else if (LOWORD(wParam) == IDC_CONFIGURE)
388 {
389 LPOLESTR DeviceInstanceID;
391
392 if (This->GetDeviceInstanceID(&DeviceInstanceID))
393 {
394 WCHAR wszCmd[2*MAX_PATH];
395 StringCbPrintfW(wszCmd, sizeof(wszCmd), L"rundll32.exe devmgr.dll,DeviceProperties_RunDLL /DeviceID %s", DeviceInstanceID);
396 CoTaskMemFree(DeviceInstanceID);
397
398 STARTUPINFOW si;
400 ZeroMemory(&si, sizeof(si));
401 si.cb = sizeof(si);
402 if (!CreateProcessW(NULL, wszCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
403 break;
404
405 CloseHandle(pi.hProcess);
406 CloseHandle(pi.hThread);
407 }
408 }
409 break;
410 }
411 return FALSE;
412}
413
414BOOL
416 OUT LPOLESTR *DeviceInstanceID)
417{
418 LPOLESTR pStr, pResult;
419 HKEY hKey;
420 DWORD dwInstanceID;
421 WCHAR szKeyName[2*MAX_PATH];
422 WCHAR szInstanceID[2*MAX_PATH];
423
425 {
426 // failed to convert guid to string
427 return FALSE;
428 }
429
430 StringCbPrintfW(szKeyName, sizeof(szKeyName), L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pStr);
431 CoTaskMemFree(pStr);
432
434 {
435 // failed to open key
436 return FALSE;
437 }
438
439 dwInstanceID = sizeof(szInstanceID);
440 if (RegGetValueW(hKey, NULL, L"PnpInstanceId", RRF_RT_REG_SZ, NULL, (PVOID)szInstanceID, &dwInstanceID) == ERROR_SUCCESS)
441 {
442 szInstanceID[MAX_PATH-1] = L'\0';
443 pResult = static_cast<LPOLESTR>(CoTaskMemAlloc((wcslen(szInstanceID) + 1) * sizeof(WCHAR)));
444 if (pResult != 0)
445 {
446 wcscpy(pResult, szInstanceID);
447 *DeviceInstanceID = pResult;
449 return TRUE;
450 }
451 }
453 return FALSE;
454}
455
457WINAPI
460 LPFNADDPROPSHEETPAGE pfnAddPage,
462{
463 HPROPSHEETPAGE hProp;
464 BOOL ret;
465 HRESULT hr = E_FAIL;
467
468 initEx.dwSize = sizeof(initEx);
470 if (!InitCommonControlsEx(&initEx))
471 return E_FAIL;
472
473 hr = m_pCon->GetProperties(&m_pProperties);
475 return hr;
476
478 if (hProp)
479 {
480 ret = (*pfnAddPage)(hProp, lParam);
481 if (ret)
482 {
483 hr = NOERROR;
484 }
485 else
486 {
488 }
489 }
490 return hr;
491}
492
494WINAPI
497 HICON *phIcon)
498{
499 return E_NOTIMPL;
500}
501
503WINAPI
505{
506 CopyMemory(pGuid, &m_pProperties->guidId, sizeof(GUID));
507 return S_OK;
508}
509
511WINAPI
513{
514 if (!pCon)
515 return E_POINTER;
516
517 m_pCon = pCon;
518 return S_OK;
519}
520
522WINAPI
526{
527 if (!m_pCon)
528 return E_POINTER; //FIXME
529
530 if (dwFlags & NCUC_NO_UI)
531 return m_pCon->Connect();
532
533 return E_FAIL;
534}
535
537WINAPI
541{
542 WCHAR szBuffer[100];
543 swprintf(szBuffer, L"INetConnectionConnectUi_fnDisconnect flags %x\n", dwFlags);
544 MessageBoxW(NULL, szBuffer, NULL, MB_OK);
545
546 return S_OK;
547}
Type
Definition: Type.h:7
#define IDC_DESCRIPTION
Definition: resource.h:129
#define RegCloseKey(hKey)
Definition: registry.h:49
T * Detach()
Definition: atlcomcli.h:186
VOID EnumComponents(HWND hDlgCtrl, INetCfg *pNCfg, const GUID *CompGuid, UINT Type, PSP_CLASSIMAGELIST_DATA pCILD)
CComPtr< INetCfgLock > m_NCfgLock
Definition: lanconnectui.h:54
STDMETHOD() AddPages(HWND hwndParent, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override
STDMETHOD() GetDeviceGuid(GUID *pGuid) override
STDMETHOD() Connect(HWND hwndParent, DWORD dwFlags) override
STDMETHOD() GetIcon(DWORD dwSize, HICON *phIcon) override
CComPtr< INetCfg > m_pNCfg
Definition: lanconnectui.h:55
static INT_PTR CALLBACK LANPropertiesUIDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID ShowNetworkComponentProperties(HWND hwndDlg)
CComPtr< INetConnection > m_pCon
Definition: lanconnectui.h:53
BOOL GetINetCfgComponent(INetCfg *pNCfg, INetCfgComponent **pOut)
STDMETHOD() SetConnection(INetConnection *pCon) override
VOID InitializeLANPropertiesUIDlg(HWND hwndDlg)
STDMETHOD() Disconnect(HWND hwndParent, DWORD dwFlags) override
NETCON_PROPERTIES * m_pProperties
Definition: lanconnectui.h:56
BOOL GetDeviceInstanceID(OUT LPOLESTR *DeviceInstanceID)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:900
static HWND hwndParent
Definition: cryptui.c:300
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#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
#define NCF_HAS_UI
Definition: precomp.h:48
#define NCF_HIDDEN
Definition: precomp.h:44
#define NCF_NOT_USER_REMOVABLE
Definition: precomp.h:46
#define NCCF_NOTIFY_DISCONNECTED
Definition: precomp.h:86
#define IDC_NETCARDNAME
Definition: resource.h:27
#define IDC_UNINSTALL
Definition: resource.h:31
#define IDC_SHOWTASKBAR
Definition: resource.h:34
#define IDD_NETPROPERTIES
Definition: resource.h:20
#define IDC_CONFIGURE
Definition: resource.h:28
#define IDC_PROPERTIES
Definition: resource.h:32
#define IDC_NOTIFYNOCONNECTION
Definition: resource.h:35
#define IDC_COMPONENTSLIST
Definition: resource.h:29
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himlSrc)
Definition: imagelist.c:1801
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
Definition: propsheet.c:3155
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4598
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412
BOOL WINAPI SetupDiDestroyClassImageList(IN PSP_CLASSIMAGELIST_DATA ClassImageListData)
Definition: devclass.c:85
BOOL WINAPI SetupDiGetClassImageIndex(IN PSP_CLASSIMAGELIST_DATA ClassImageListData, IN CONST GUID *ClassGuid, OUT PINT ImageIndex)
Definition: devclass.c:277
BOOL WINAPI SetupDiGetClassImageList(OUT PSP_CLASSIMAGELIST_DATA ClassImageListData)
Definition: devclass.c:322
#define RRF_RT_REG_SZ
Definition: driver.c:575
#define swprintf
Definition: precomp.h:40
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235
GLeglImageOES image
Definition: gl.h:2204
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
VOID AddItemToListView(HWND hDlgCtrl, PNET_ITEM pItem, LPWSTR szName, BOOL bChecked, UINT Image)
NET_TYPE
Definition: lanconnectui.h:7
@ NET_TYPE_PROTOCOL
Definition: lanconnectui.h:10
@ NET_TYPE_SERVICE
Definition: lanconnectui.h:9
@ NET_TYPE_CLIENT
Definition: lanconnectui.h:8
struct NET_ITEM * PNET_ITEM
if(dx< 0)
Definition: linetemp.h:194
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static LPSTR pName
Definition: security.c:75
static HICON
Definition: imagelist.c:80
static LPOLESTR
Definition: stg_prop.c:27
static refpint_t pi[]
Definition: server.c:96
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
@ NCRP_QUERY_PROPERTY_UI
Definition: netcfgx.h:31
@ NCRP_SHOW_PROPERTY_UI
Definition: netcfgx.h:32
EXTERN_C const GUID CLSID_CNetCfg
Definition: netcfgx.h:299
@ NCCF_SHOW_ICON
Definition: netcon.h:20
@ NCUC_NO_UI
Definition: netcon.h:178
HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
Definition: netshell.cpp:29
VOID WINAPI NcFreeNetconProperties(NETCON_PROPERTIES *pProps)
Definition: netshell.cpp:119
int Count
Definition: noreturn.cpp:7
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
static const WCHAR szName[]
Definition: powrprof.c:45
#define PSNRET_INVALID
Definition: prsht.h:130
#define PSN_APPLY
Definition: prsht.h:117
#define PSNRET_NOERROR
Definition: prsht.h:129
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:327
struct _PSHNOTIFY * LPPSHNOTIFY
#define PROPSHEETPAGE
Definition: prsht.h:389
#define LVSIL_SMALL
Definition: commctrl.h:2304
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2678
#define NM_DBLCLK
Definition: commctrl.h:131
#define ListView_SetCheckState(hwndLV, i, fCheck)
Definition: commctrl.h:2679
#define LVIF_STATE
Definition: commctrl.h:2317
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2309
#define LVCF_WIDTH
Definition: commctrl.h:2592
#define LVN_ITEMCHANGING
Definition: commctrl.h:3135
#define LVS_EX_CHECKBOXES
Definition: commctrl.h:2736
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2739
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2312
#define LVIS_SELECTED
Definition: commctrl.h:2324
#define LVIF_PARAM
Definition: commctrl.h:2316
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVM_INSERTCOLUMNW
Definition: commctrl.h:2637
#define LVIF_TEXT
Definition: commctrl.h:2314
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2732
#define LVCF_FMT
Definition: commctrl.h:2591
#define LVCF_SUBITEM
Definition: commctrl.h:2594
#define LVIF_IMAGE
Definition: commctrl.h:2315
#define LVM_INSERTITEMW
Definition: commctrl.h:2409
#define LVCF_TEXT
Definition: commctrl.h:2593
#define LVM_GETITEMW
Definition: commctrl.h:2395
#define LVIS_FOCUSED
Definition: commctrl.h:2323
#define I_IMAGENONE
Definition: commctrl.h:2391
#define ICC_LISTVIEW_CLASSES
Definition: commctrl.h:58
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2729
#define LV_COLUMN
Definition: commctrl.h:2552
#define WM_NOTIFY
Definition: richedit.h:61
#define REG_DWORD
Definition: sdbapi.c:596
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
INetCfgComponent * pNCfgComp
Definition: lanconnectui.h:18
NET_TYPE Type
Definition: lanconnectui.h:15
UINT NumPropDialogOpen
Definition: lanconnectui.h:19
LPWSTR szHelp
Definition: lanconnectui.h:17
DWORD dwCharacteristics
Definition: lanconnectui.h:16
NMHDR hdr
Definition: prsht.h:330
DWORD cb
Definition: winbase.h:852
Definition: module.h:576
LPWSTR pszText
Definition: commctrl.h:2572
LPWSTR pszText
Definition: commctrl.h:2370
int iSubItem
Definition: commctrl.h:2367
UINT state
Definition: commctrl.h:2368
UINT mask
Definition: commctrl.h:2365
LPARAM lParam
Definition: commctrl.h:2373
UINT stateMask
Definition: commctrl.h:2369
int iImage
Definition: commctrl.h:2372
LPWSTR pszwDeviceName
Definition: netcon.h:85
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
UINT uNewState
Definition: commctrl.h:3041
UINT uOldState
Definition: commctrl.h:3042
LONG right
Definition: windef.h:308
LONG left
Definition: windef.h:306
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT_PTR
Definition: typedefs.h:64
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
int ret
_In_ WDFCOLLECTION _In_ ULONG Index
#define ZeroMemory
Definition: winbase.h:1712
#define CopyMemory
Definition: winbase.h:1710
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define NOERROR
Definition: winerror.h:2354
#define E_POINTER
Definition: winerror.h:2365
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define DWLP_USER
Definition: winuser.h:875
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define BM_SETCHECK
Definition: winuser.h:1924
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETTEXT
Definition: winuser.h:1620
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SendMessage
Definition: winuser.h:5855
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MB_OK
Definition: winuser.h:793
HWND WINAPI GetParent(_In_ HWND)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1921
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184