NV_DX_interop : Error 0xc007006e on wglDXOpenDeviceNV in Sandbox

I am using wglDXOpenDeviceNV in order to capture frames as shared textures to subsequently (in a different process inside the same sandbox) feed to NVENC as D3D11 Texture2Ds.

The problem is that inside Windows Sandbox (which I need to support) the wglDXOpenDeviceNV fails with 0xc007006e ERROR_OPEN_FAILED. The issue does not happen on the host system, and it happens regardless of the adapter I create my D3D11 device on (e.g. I enumerate D3D adapters and try all of them with the same issue).

Is it possible to investigate what causes the wglDXOpenDeviceNV call to fail to open the device?

I just tried on a machine with Intel iGPU, and the issue does not reproduce there. So seems to be NVidia specific.

See repro: reproduces wglDXOpenDeviceNV ERROR_OPEN_FAILED inside Sandbox with NVidia GPU · GitHub