4

Does anyone know how to invoke native function to set Windows 10 Night Light option to True ?

Seems like SetDeviceGammaRamp() is the only option. If so, then how to set the value to pass to the function in order to have reddish screen?

Altiano Gerung
  • 824
  • 2
  • 15
  • 28
  • Check [this question](https://stackoverflow.com/questions/8359607/correct-usage-of-setdevicegammaramp) for some relevant information. You would use Platform Invoke (pinvoke) to invoke the unmanaged function from managed code in the same way as any other. – jmcilhinney Jul 06 '18 at 07:03
  • I would suspect that's your option. I'd guess night light is just a service which does exactly that. – Stevo Jul 06 '18 at 09:23
  • Duplicate to https://superuser.com/questions/1200222/configure-windows-creators-update-night-light-via-registry – Lex Li Jul 06 '18 at 16:30
  • @LexLi no, I'm asking for .net solution – Altiano Gerung Jul 16 '18 at 12:54

0 Answers0