Can I use a managed C # DLL in an unmanaged Delphi EXE?

Is it possible to use a managed C # DLL in an unmanaged Delphi EXE? Or is the only way to manage the DLL and EXE or the unmanaged DLL and EXE?

+4
source share
1 answer

There are several options, including at least the following:

  • Open the classes that you need through COM, which can be easily used by Delphi.
  • Create a mixed C ++ / CLI shell that uses the C # DLL as a reference. This mixed-mode DLL can export its own functions, and you can then use this DLL using Delphi external . That is, you consume DLLs just like Windows consume DLLs.
  • Use Robert Giesecke UnmanagedExports .
  • Use the native CLR API to directly use the C # DLL. This option is probably the least attractive since it is the hardest to fix.
+5
source

Source: https://habr.com/ru/post/1494259/


All Articles