views:

226

answers:

2

I have a dll developed in C Sharp. How can I make it usable in other languages, such as PHP or Delphi?

I cannot find any solution to this problem yet. Isn't there any easy way of doing this?

+9  A: 

If Delphi can understand COM, then you can make a COM wrapper around the .NET DLL.

I am doing this now for an older IDE which doesn't understand .NET, but it understands COM so I am able to use the latest .NET features in my older applications.

0A0D
Yes, forgot about that route.
Henk Holterman
This is probably the best way, and Delphi *can* understand COM. It's got COM interface support built in as a language feature.
Mason Wheeler
@Mason: Thanks I wasn't sure.
0A0D
A: 

In addition to COM, you could try these (from my Delphi Win32 to WCF answer) for Delphi Win32:

The last one might be the real one you are after.

For PHP it is a different story;

  • PHP might run on a non-Windows box,
  • there are .NET implementations of PHP that would allow for direct linking of your C# assembly DLL

--jeroen

Jeroen Pluimers