Ejemplo n.º 1
0
 private static string MonitorFriendlyName(LUID adapterId, uint targetId)
 {
     var deviceName = new DISPLAYCONFIG_TARGET_DEVICE_NAME
     {
         header =
         {
             size = (uint)Marshal.SizeOf(typeof (DISPLAYCONFIG_TARGET_DEVICE_NAME)),
             adapterId = adapterId,
             id = targetId,
             type = DISPLAYCONFIG_DEVICE_INFO_TYPE.DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME
         }
     };
     var error = DisplayConfigGetDeviceInfo(ref deviceName);
     if (error != ERROR_SUCCESS)
         throw new Win32Exception(error);
     return deviceName.monitorFriendlyDeviceName;
 }
Ejemplo n.º 2
0
 public static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_TARGET_DEVICE_NAME requestPacket);
Ejemplo n.º 3
0
 public static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_TARGET_DEVICE_NAME deviceName);
Ejemplo n.º 4
0
 public static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_TARGET_DEVICE_NAME deviceName);