Author: gedmurphy
Date: Mon Oct 26 08:40:14 2015
New Revision: 69704
URL:
http://svn.reactos.org/svn/reactos?rev=69704&view=rev
Log:
[DEVMGR]
- Hide legacy devices and volumes by default
- Patch by Eric Kohl
CORE-10396
Modified:
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp [iso-8859-1] Mon Oct 26 08:40:14
2015
@@ -196,8 +196,13 @@
NULL);
if (cr == CR_SUCCESS)
{
- return ((m_Status & DN_NO_SHOW_IN_DM) != 0);
- }
+ if (m_Status & DN_NO_SHOW_IN_DM)
+ return true;
+ }
+
+ if (IsEqualGUID(*GetClassGuid(), GUID_DEVCLASS_LEGACYDRIVER) ||
+ IsEqualGUID(*GetClassGuid(), GUID_DEVCLASS_VOLUME))
+ return true;
return false;
}
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Mon Oct 26 08:40:14
2015
@@ -460,6 +460,18 @@
if (IsEqualGUID(ClassGuid, GUID_DEVCLASS_UNKNOWN))
bClassUnknown = true;
+ // Check if this is a hidden class
+ if (IsEqualGUID(ClassGuid, GUID_DEVCLASS_LEGACYDRIVER) ||
+ IsEqualGUID(ClassGuid, GUID_DEVCLASS_VOLUME))
+ {
+ // Ignore this device if we aren't displaying hidden devices
+ if (m_ShowHidden == FALSE)
+ {
+ ClassIndex++;
+ continue;
+ }
+ }
+
do
{
// Get a handle to all the devices in this class