cuvidCreateDecoder failed in WIN7 VS2015

Hello

There was a issue that confused me for long time, could anybody can help me then I will be very appreciated!

When I start a video deocder following SDK samples as following,
cuInit (0, __CUDA_API_VERSION, hHandleDriver);
cuvidInit(0);
cuvidCreateDecoder(…)
the errcode is CUDA_ERROR_INVALID_CONTEXT, that means I have to create a device context, but while I calling cuDeviceGet or other related device interfaces, there always be a crash.

But if I use following code segment,
cuInit(0);
cuDeviceGet(&cuDevice, dev);
cuvidCreateDecoder(…);
then device information can be found correctlly, but cuvidCreateDecoder interface will be crashed.

It seems no possible ways to call the three Init interface at the same time.

Development environment:
CUDA SDK 9.2
Windows 7
Visual Studio 2015
NVIDIA GeFirce GTX 750 Ti