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); }
internal static extern ErrorCode DisplayConfigGetDeviceInfo( [In, Out] AdapterDevicePath adapterInformation );