The line: "ctx->PSGetSamplers(0, 1, &old.PSSampler);" will fail silently (no return code) but will not modify old.PSSampler making the game crash when accessing uninitialized memory.
Skyrim deployed its own d3dcompile dll that nullifies shaders compilation, so you either have to load the one in C:\Windows\System32|SysWow64 or use prebuilt.
I use prebuilt
Why does CreateDeviceObjects return a bool if the NewFrame doesn't ?
Added the return parameter cause CreateDeviceObjects can fail.
It did fail on DX11 with feature level to 9.