Click here to Skip to main content
15,919,500 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using VS2015 on Windows10.

I am trying to write a D3D11 scene to be manipulated (hopefully) as a .NET object by my WPF App and rendered in a D3D Image.

I would like to avoid C Interop and C++ CLI if I could use UWP or some COM magic to make my C++ code available to .NET.

I tried to follow this blog by Scott Hanselman:[^]

But I can't seem to make it work with Windows 10 + VS2015 + my custom C++ component.

Any ideas?
Should I go with C++ CLI after all?
Sergey Alexandrovich Kryukov 4-Dec-15 16:19pm    
I would advise you to avoid "COM magic" (actually, to avoid by all means) and also any other kind of "magic", and use C++/CLI and/or, maybe, UWP, depending on what you want to achieve.
And "in a WPF app" assumes that this is .NET application, which means, using CIL and, hence one of .NET languages, including C++/CLI.
Sorry, but your question is not clear enough for further discussion; your "I can't seem to make it work" is not quite informative.
Super Lloyd 4-Dec-15 20:50pm    
I tried UWP and WinRT Win8 project, but I keep running into error such as:

An unhandled exception of type 'System.TypeLoadException' occurred in WpfD3D11Interop.exe

Additional information: Could not find Windows Runtime type 'VisualizationComponent.Class1'.
with the InnerException message:

Types from custom Windows Runtime components are not supported in desktop applications.

That said I just remember my annoyance with C++ CLI is that it target a particular architecture (x86/x64/arm) and you can't ship (easily) multiple architecture together.
And that annoyance is not in any way improved by a native C++ component!
So there is no point for me to go through a complicated build process after all!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900