Author: gedmurphy
Date: Wed Jun 17 08:38:34 2015
New Revision: 68169
URL:
http://svn.reactos.org/svn/reactos?rev=68169&view=rev
Log:
[DEVMGR]
- Make sure the device nodes use the latest device status'
Modified:
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp
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] Wed Jun 17 08:38:34
2015
@@ -34,7 +34,7 @@
{
CDeviceView *This;
BOOL ScanForChanges;
-BOOL UpdateView;
+ BOOL UpdateView;
};
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/N…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp [iso-8859-1] Wed Jun 17 08:38:34 2015
@@ -75,32 +75,87 @@
bool
CNode::IsHidden()
{
- return ((m_Status & DN_NO_SHOW_IN_DM) != 0);
+ CONFIGRET cr;
+ cr = CM_Get_DevNode_Status_Ex(&m_Status,
+ &m_ProblemNumber,
+ m_DevInst,
+ 0,
+ NULL);
+ if (cr == CR_SUCCESS)
+ {
+ return ((m_Status & DN_NO_SHOW_IN_DM) != 0);
+ }
+
+ return false;
}
bool
CNode::CanDisable()
{
- return (m_NodeType == NodeDevice && ((m_Status & DN_DISABLEABLE) != 0));
+ CONFIGRET cr;
+ cr = CM_Get_DevNode_Status_Ex(&m_Status,
+ &m_ProblemNumber,
+ m_DevInst,
+ 0,
+ NULL);
+ if (cr == CR_SUCCESS)
+ {
+ return (m_NodeType == NodeDevice && ((m_Status & DN_DISABLEABLE) !=
0));
+ }
+
+ return false;
}
bool
CNode::IsDisabled()
{
- return ((m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) !=
0);
+ CONFIGRET cr;
+ cr = CM_Get_DevNode_Status_Ex(&m_Status,
+ &m_ProblemNumber,
+ m_DevInst,
+ 0,
+ NULL);
+ if (cr == CR_SUCCESS)
+ {
+ return ((m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) !=
0);
+ }
+
+ return false;
}
bool
CNode::IsStarted()
{
- return ((m_Status & DN_STARTED) != 0);
+ CONFIGRET cr;
+ cr = CM_Get_DevNode_Status_Ex(&m_Status,
+ &m_ProblemNumber,
+ m_DevInst,
+ 0,
+ NULL);
+ if (cr == CR_SUCCESS)
+ {
+ return ((m_Status & DN_STARTED) != 0);
+ }
+
+ return false;
}
bool
CNode::IsInstalled()
{
- return ((m_Status & DN_HAS_PROBLEM) != 0 ||
- (m_Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0);
+ CONFIGRET cr;
+ cr = CM_Get_DevNode_Status_Ex(&m_Status,
+ &m_ProblemNumber,
+ m_DevInst,
+ 0,
+ NULL);
+ if (cr == CR_SUCCESS)
+ {
+ return ((m_Status & DN_HAS_PROBLEM) != 0 ||
+ (m_Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0);
+ }
+
+ return false;
}