Trader.Net,
OK, I found that - interesting - thx for the heads up.
But what I want to do is: I have dll's that I bought that do all kinds of nifty stuff. They are written in C++ and they come with source.
I just want to call them from C#, so I _believe_ I have to do an enourmous amount of work to call those unmanaged C++ functions from C# (and I still do not see how managed C++ makes this easier than in C#,) since there are include files that have complex classes, templates, etc, and functions that take these classes/templates as parameters. This is not like calling a function that takes an int.
I guess a good analogy as to the complexity that I am facing and an interesting example would be:
Show how to call an old C++ STL function in a .dll that takes a complex set of parameters from C#. And also interesting would be, show why and how this would be easier from managed C++ (if it is) ?
Like I said, AFAIK, this is not trivial. If you think about it, there is no reason why I should not be able to say:
extern "unmanaged C" { //nitro invented this syntax
#include unmangedcode.h
}
and have the compiler do all the work
What is really funny to me is that, if the .dll was offered as an ActiveX dll, all would be fine and dandy, as it is super easy to use ActiveX dll's from C# - LOL! -ugh -

So there is another question - how hard is it, comparitively to doing the managed Interop stuff on non-trivial functions, to turn an old style .dll into an ActiveX .dll if you have access to source code? I wish there was just a tool that did this...
The "It just works" only "works" (easily) for trivial functions - AFAIK.
nitro
Quote from Trader.NET:
I mean you would use VC++ if you have to use a lot of non-managed c++ stuffs. Or you have to do interop or wrap it with managed c++. Do a goggle on Quake2 .NET for how to integrate c/c++ stuff with .NET.