Monitor ID and Serial Number

前端 未结 4 525
粉色の甜心
粉色の甜心 2021-01-16 06:16

In Windows we have information about our Monitros - some unique name and id. e.g.

  1. Acer xxx
  2. Samsung xxx

I have qeuestion how to get the

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-16 06:48

    As an example, we use this to retrieve the serial from the primary HDD using WMI:

    var search = new ManagementObjectSearcher("select * from Win32_LogicalDisk where DeviceID = 'C:'");
    var serials = search.Get().OfType();
    m_clientToken = serials.ElementAt(0)["VolumeSerialNumber"].ToString();
    

    Perhaps you can utilize this to get your monitor information since you know which Mgmt Object to search. You basically use SQL to retrieve what you're looking for.

提交回复
热议问题