Sample run-time error on Win10 VS2017

Hi guys,

I’m trying to work on the NVIDIA CODEC API for video encoding/decoding. I’m running it on Win10 VS2017. It compiled well, however, it always gives me the run time error:

Exception thrown at 0x7730A9F2 in AppEncD3D9.exe: Microsoft C++ exception: std::invalid_argument at memory location 0x001DF5F8.
The thread 0x5b4c has exited with code 1 (0x1).

I have no idea if this is me who did something wrong since all the sample projects are giving me this same run time error.

Any help is appreciated