//
// If the devices class has the NoDisplayClass value then
// don't display this device.
//
if (hKeyClass = SetupDiOpenClassRegKey(ClassGuid,KEY_READ))
{
bHidden = (RegQueryValueEx(hKeyClass,
REGSTR_VAL_NODISPLAYCLASS,
NULL, NULL, NULL, NULL) == ERROR_SUCCESS);
RegCloseKey(hKeyClass);
}
//
// Enumerate though all the devices.
//
for (i=0;SetupDiEnumDeviceInfo(hDevInfo,i,&DeviceInfoData);i++)
{
//
// Should we display this device, or move onto the next one.
//
if (CR_SUCCESS != CM_Get_DevNode_Status(&Status, &Problem,
DeviceInfoData.DevInst,0))
{
continue;
}
if (!(ShowHidden || !((Status & DN_NO_SHOW_IN_DM) ||
IsClassHidden(&DeviceInfoData.ClassGuid))))
continue;