[Interest] Calling Windows Managed Assembly (in DLL file) from Qt
Andrew.Knight at digia.com
Tue Dec 31 15:36:31 CET 2013
> I want to ask you if you have any ideas how to call Windows Managed Assembly (in DLL file) from Qt.
> I tried in several ways, but failed. Is it possible at all?
You didn't mention the ways you tried. You can of course use C++/CLR, but I wouldn't recommend it. Qt Creator doesn't do a great job of editing that mess, and I've found that mixed mode debugging (i.e. debugging a native application with some CLR objects thrown in) can be unreliable.
ActiveQt has an example of wrapping a .NET object (http://qt-project.org/doc/qt-5/activeqt-dotnet.html). ActiveQt can wrap COM interfaces in general, and it's generally possible to expose managed objects as such.
If you're not interested in using ActiveQt, you can do it by hand. Take a look at this experiment for inspiration: https://codereview.qt-project.org/#change,73047
More information about the Interest