I'm trying to pass a NativePointer of a D3D11Device to C++ through a DirectShow filter, which uses a COMImport-attribute. The idea is that C++ will create a texture on the device I pass in and hand that back to me in C#.
I can verify my NativePointer, which I assume becomes a ComPtr, reaches my C++ code. However, after doing so, I have trouble actually using the device in the ComPtr. My function signature looks something like this in C++: void Renderer::setDevice(ComPtr<ID3D11Device> device)
Any tips on how to achieve what I want? Or is what I'm trying to do plain impossible? The latter of which would seem silly as technically it would be possible to instance a device on the C++ side, and pass that to C# to wrap it in a SharpDX Device-class...
I'm trying to pass a NativePointer of a D3D11Device to C++ through a DirectShow filter, which uses a COMImport-attribute. The idea is that C++ will create a texture on the device I pass in and hand that back to me in C#.
I can verify my NativePointer, which I assume becomes a ComPtr, reaches my C++ code. However, after doing so, I have trouble actually using the device in the ComPtr. My function signature looks something like this in C++:
void Renderer::setDevice(ComPtr<ID3D11Device> device)
Any tips on how to achieve what I want? Or is what I'm trying to do plain impossible? The latter of which would seem silly as technically it would be possible to instance a device on the C++ side, and pass that to C# to wrap it in a SharpDX Device-class...