Skip to content

Commit 7807185

Browse files
committed
[WLANWIZ] Introduce debug information
In a moment of doubt some help would be nice. We will start with chosen adapter and its radio power status (disabled or not). [WLANWIZ] Sorting oops
1 parent 8382233 commit 7807185

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

dll/shellext/wlanwiz/main.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
5-
* COPYRIGHT: Copyright 2024 Vitaly Orekhov <[email protected]>
5+
* COPYRIGHT: Copyright 2024-2025 Vitaly Orekhov <[email protected]>
66
*/
77

88
#pragma once
@@ -11,6 +11,7 @@
1111
#include <atlconv.h>
1212
#include <atlstr.h>
1313
#include <atlwin.h>
14+
#include <debug.h>
1415
#include <strsafe.h>
1516
#include <shlobj.h>
1617
#include <shlwapi.h>

dll/shellext/wlanwiz/scan.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ LRESULT CWlanWizard::OnScanNetworks(WORD wNotifyCode, WORD wID, HWND hWndCtl, BO
3939
reinterpret_cast<PVOID*>(&pWRSCurAdapter),
4040
&wovtCurrAdapter);
4141

42+
DPRINT("WLAN adapter radio status: hardware %s, software %s\n",
43+
pWRSCurAdapter->PhyRadioState[0].dot11HardwareRadioState == dot11_radio_state_on ? "on" : "off",
44+
pWRSCurAdapter->PhyRadioState[0].dot11SoftwareRadioState == dot11_radio_state_on ? "on" : "off");
45+
4246
if (!( pWRSCurAdapter->PhyRadioState[0].dot11SoftwareRadioState == dot11_radio_state_on
4347
&& pWRSCurAdapter->PhyRadioState[0].dot11HardwareRadioState == dot11_radio_state_on))
4448
{

dll/shellext/wlanwiz/wlanwiz.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
5-
* COPYRIGHT: Copyright 2024 Vitaly Orekhov <[email protected]>
5+
* COPYRIGHT: Copyright 2024-2025 Vitaly Orekhov <[email protected]>
66
*/
77

88
#include "main.h"
@@ -137,6 +137,7 @@ BOOL CWlanWizard::FindWlanDevice(ATL::CString sGUID)
137137
{
138138
if (IsEqualGUID(gWlanDeviceID, this->lstWlanInterfaces->InterfaceInfo[i].InterfaceGuid))
139139
{
140+
DPRINT("Using manually selected adapter %S\n", this->lstWlanInterfaces->InterfaceInfo[i].strInterfaceDescription);
140141
StringFromIID(gWlanDeviceID, &this->m_sGUID);
141142
return TRUE;
142143
}
@@ -150,7 +151,10 @@ BOOL CWlanWizard::FindWlanDevice(ATL::CString sGUID)
150151
BOOL bWlanDevicePresent = this->lstWlanInterfaces->dwNumberOfItems > 0;
151152

152153
if (bWlanDevicePresent)
154+
{
155+
DPRINT("Using automatically selected adapter %S\n", this->lstWlanInterfaces->InterfaceInfo[0].strInterfaceDescription);
153156
dwResult = StringFromIID(this->lstWlanInterfaces->InterfaceInfo[0].InterfaceGuid, &this->m_sGUID);
157+
}
154158

155159
return bWlanDevicePresent;
156160
}

0 commit comments

Comments
 (0)