You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hardware.Info.HardwareInfo.RefreshMonitorList() throws an exeption when there is no monitor connected and the computer is controlled via RDP.
Code:
public class HardwareInformation
{
private static readonly HardwareInfo HardwareInfo = new();
public void GetInfo()
{
HardwareInfo.RefreshAll();
}
}
Exception message:
System.Management.ManagementException: Not supported
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at System.Linq.Enumerable.CastIterator[TResult](IEnumerable source)+MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Hardware.Info.Windows.HardwareInfoRetrieval.GetMonitorList()
at Hardware.Info.HardwareInfo.RefreshMonitorList()
at Hardware.Info.HardwareInfo.RefreshAll()
The text was updated successfully, but these errors were encountered:
0.9.3
Win 11 (64 bit)
Hardware.Info.HardwareInfo.RefreshMonitorList() throws an exeption when there is no monitor connected and the computer is controlled via RDP.
Code:
Exception message:
The text was updated successfully, but these errors were encountered: