mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +00:00
[DEVMGR]
- Make sure the device nodes use the latest device status' svn path=/trunk/; revision=68169
This commit is contained in:
parent
7e9f045d24
commit
d9a14b3064
2 changed files with 62 additions and 7 deletions
|
@ -34,7 +34,7 @@ struct RefreshThreadData
|
||||||
{
|
{
|
||||||
CDeviceView *This;
|
CDeviceView *This;
|
||||||
BOOL ScanForChanges;
|
BOOL ScanForChanges;
|
||||||
BOOL UpdateView;
|
BOOL UpdateView;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,32 +75,87 @@ CNode::HasProperties()
|
||||||
bool
|
bool
|
||||||
CNode::IsHidden()
|
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
|
bool
|
||||||
CNode::CanDisable()
|
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
|
bool
|
||||||
CNode::IsDisabled()
|
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
|
bool
|
||||||
CNode::IsStarted()
|
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
|
bool
|
||||||
CNode::IsInstalled()
|
CNode::IsInstalled()
|
||||||
{
|
{
|
||||||
return ((m_Status & DN_HAS_PROBLEM) != 0 ||
|
CONFIGRET cr;
|
||||||
(m_Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue