Holger Kasten said:
How to call managed code from unmanaged code?
It depends, first what do you call unmanaged code, more exactly what's the
language of implementation?
If it's native C++ you have two options:
- write a mixed code wrapper using Managed C++ (or the upcoming C++/CLI),
or.
- expose your C# classes as COM objects (check MSDN for details on COM
interop), and change your C code such that you can call into COM.
If it's VB6 or Delphi or another language that supports COM natively, your
bets bet is to expsose your C# classes as COM interfaces.
Note however that COM interop puts some constraints on the classes and types
passed to/from unmanaged code.
Willy.