22 * PROJECT: ReactOS Shell
33 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
44 * PURPOSE: ReactOS Wizard for Wireless Network Connections (WLAN Advanced Settings)
5- * COPYRIGHT: Copyright 2024 Vitaly Orekhov <[email protected] > 5+ * COPYRIGHT: Copyright 2024-2025 Vitaly Orekhov <[email protected] > 66 */
7-
87#include " main.h"
98
109LRESULT CWlanWizard::OnAdvancedSettings (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
@@ -17,35 +16,22 @@ LRESULT CWlanWizard::OnAdvancedSettings(WORD wNotifyCode, WORD wID, HWND hWndCtl
1716 LPCITEMIDLIST pidlChild = NULL ;
1817 SHDESCRIPTIONID did = { 0 };
1918
20- HRESULT hr = SHGetSpecialFolderLocation (NULL , CSIDL_CONNECTIONS, &pidl);
21-
22- if (FAILED (hr))
19+ if (FAILED (SHGetSpecialFolderLocation (NULL , CSIDL_CONNECTIONS, &pidl)))
2320 goto Exit;
2421
25- hr = SHBindToParent (pidl, IID_IShellFolder, reinterpret_cast <LPVOID*>(&sfConn), &pidlChild);
26-
27- if (FAILED (hr))
22+ if (FAILED (SHBindToParent (pidl, IID_IShellFolder, reinterpret_cast <LPVOID*>(&sfConn), &pidlChild)))
2823 goto Exit;
2924
30- hr = SHGetDataFromIDListW (sfConn, pidlChild, SHGDFIL_DESCRIPTIONID, &did, sizeof (did));
31-
32- if (FAILED (hr))
25+ if (FAILED (SHGetDataFromIDListW (sfConn, pidlChild, SHGDFIL_DESCRIPTIONID, &did, sizeof (did))))
3326 goto Exit;
3427
35- hr = StringFromIID (did.clsid , &lpwszNetConCLSID);
36-
37- if (FAILED (hr))
28+ if (FAILED (StringFromIID (did.clsid , &lpwszNetConCLSID)))
3829 goto Exit;
3930
4031 ILFree (pidl);
4132 sfConn.Release ();
4233#else
43- #if _WIN32_WINNT < _WIN32_WINNT_VISTA
44- HRESULT hr = StringFromIID (CLSID_NetworkConnections, &lpwszNetConCLSID);
45- #else
46- HRESULT hr = StringFromIID (CLSID_ConnectionFolder, &lpwszNetConCLSID);
47- #endif
48- if (FAILED (hr))
34+ if (FAILED (StringFromIID (CLSID_NetworkConnections, &lpwszNetConCLSID)))
4935 goto Exit;
5036#endif
5137 cswNetworkAdapterPath.Format (L" ::%s\\ ::%s" , lpwszNetConCLSID, this ->m_sGUID );
0 commit comments