1

.netCore v1.1 has ClassLibrary Project and it will compile to a DLL

Is this DLL is unmanaged? and can i call it from C++ or Delphi?

Pejman Nikram
  • 570
  • 2
  • 11
  • 26
  • 4
    No, that DLL is managed and you can't call it from C++ or Delphi. You can, however, add a non portable interface library where you may export COM objects (write it in C++/CLI, C# and any other .NET language and consume them from almost any language, including C++ and Delphi). Alternatively write this library in C++/CLI and you can export plain C functions. – Adriano Repetti Aug 30 '17 at 08:03
  • @AdrianoRepetti Thanks. I use other methods like [Robert Giesecke](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) but was wondering can i use .netCore or not. – Pejman Nikram Aug 30 '17 at 08:07
  • I don't know if that package is compatible with .NET Core 1.1, if I should guess I'd say...no but nothing is better than trying! – Adriano Repetti Aug 30 '17 at 08:12
  • @AdrianoRepetti you are right. this package is compatible with .net not .netCore. I means use this package and .net for make DLL – Pejman Nikram Aug 30 '17 at 08:23
  • The first comment outlines your options quite clearly – David Heffernan Aug 30 '17 at 08:29
  • See also https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports – Ondrej Kelle Aug 30 '17 at 11:26
  • @ondrej The discussion above concerns UnmanagedExports, which seems not to be for .net core. – David Heffernan Aug 31 '17 at 06:37

1 Answers1

-1

You may need to host .NET environment inside your code.

In Delphi you may use TJclClrHost class from JclDotNet.pas unit (Jedi Code Library).

PS The classes in your DLL may be not ComVisible so you may need to use reflection to make the call. See "using reflection" sample from Hosting CLR in Delphi with/without JCL - example

nkr
  • 3,026
  • 7
  • 31
  • 39
Max Abramovich
  • 473
  • 4
  • 11