Пример #1
0
        private static string GetAdapterDevicePath(DisplayDeviceId displayDeviceId)
        {
            var adapterName = new AdapterDevicePath(displayDeviceId);
            var errorCode   = SafeNativeMethods.DisplayConfigGetDeviceInfo(adapterName);

            if (errorCode == ErrorCode.None)
            {
                return(adapterName.DevicePath.TrimEnd('\0'));
            }

            throw GetException(errorCode);
        }
Пример #2
0
 internal static extern ErrorCode DisplayConfigGetDeviceInfo(
     [In, Out] AdapterDevicePath adapterInformation
     );