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: http://stackoverflow.com/questions/17024408/how-to-use-the-nvapi-disp-setdisplayconfig-function-in-c/17682865#17682865

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!