m_DeviceId,
ulLength + 1,
0);
- if (cr != CR_SUCCESS)
+ if (cr != CR_SUCCESS || wcscmp(m_DeviceId, L"HTREE\\ROOT\\0") == 0)
{
delete[] m_DeviceId;
m_DeviceId = NULL;
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;
}