Changing Nvidia Card Settings with NVAPI issues: NvAPI_DISP_SetDisplayConfig

I’m trying to set certain configurations for my Nvidia 8400 card such as forcing SVIDEO, refresh rate, etc. I hear the NVAPI is the best way to do this. However; I seem to be crashing on the NvAPI_DISP_SetDisplayConfig call which i’m using like in this stack overflow thread: scaling - How to use the NvAPI_DISP_SetDisplayConfig function in C++? - Stack Overflow

There seems to be very little documentation on setting graphics configuration from the command line/script for NVIDIA. There is even poorer documentation covering NVAPI examples. So if anyone can post some examples of how to properly use NvAPI_DISP_SetDisplayConfig it would help me and probably a lot of other people. BTW: this is for Windows 7.

Thanks!