internal static string GetDeviceInterfaceName(Guid class_guid)
        {
            DeviceProperty prop = GetProperty(class_guid, true, DevicePropertyKeys.DEVPKEY_DeviceInterfaceClass_Name);

            if (prop?.Type == DEVPROPTYPE.STRING)
            {
                return(prop.GetString());
            }
            prop = GetProperty(class_guid, true, DevicePropertyKeys.DEVPKEY_NAME);
            if (prop?.Type == DEVPROPTYPE.STRING)
            {
                return(prop.GetString());
            }
            return(DeviceInterfaceClassGuids.GuidToName(class_guid));
        }
        internal static string GetDeviceName(int devinst)
        {
            DeviceProperty prop = GetProperty(devinst, DevicePropertyKeys.DEVPKEY_Device_FriendlyName);

            if (prop?.Type == DEVPROPTYPE.STRING)
            {
                return(prop.GetString());
            }
            prop = GetProperty(devinst, DevicePropertyKeys.DEVPKEY_NAME);
            if (prop?.Type == DEVPROPTYPE.STRING)
            {
                return(prop.GetString());
            }
            return(GetProperty(devinst, DevicePropertyKeys.DEVPKEY_Device_DeviceDesc)?.GetString() ?? string.Empty);
        }