GetGammaRampEx failed.. nvcpl.dll

Hey!

I hope thats the right forum to ask this, but I used the code from site 48 of http://developer.download.nvidia.com/SDK/9.5/Samples/DEMOS/common/src/NvCpl/docs/NVControlPanel_API.pdf 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!

Thx
-manosch176