GetGammaRampEx failed.. nvcpl.dll


I hope thats the right forum to ask this, but I used the code from site 48 of about using GammaRampEx and when I run the code it says “Failed to get gamma ramp for desktop.” but I just can’t find out why this exception occurs and how I can fix that.

Btw: I’m very new too C++ and the Nvidia API’s

I hope someone here can help me!