public static void ChangeColorEffect(float[,] matrix) { ColorEffect colorEffect = new ColorEffect(matrix); if (!NativeMethods.SetMagnificationDesktopColorEffect(ref colorEffect)) { var inner = new Exception("SetMagnificationDesktopColorEffect()", Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error())); throw new CannotChangeColorEffectException("An error occured while applying a color effect. Another application using the same API might be interfering...", inner); } }
public static extern bool MagSetFullscreenColorEffect(ref ColorEffect pEffect);
public static extern bool SetMagnificationDesktopColorEffect(ref ColorEffect pEffect);
public static extern bool MagGetColorEffect(IntPtr hwnd, ref ColorEffect pEffect);
public static extern bool GetMagnificationDesktopColorEffect(out ColorEffect pEffect);