Is it Possible to call a C# library (dll) from a non managed languagesuch as Perl?

S

SteveM

I suspect that this is either not possible or really really tricky,
but need to ask. We have a great deal of work done in perl in our
environment, and we are currently starting to do more work with .Net
and C#. A marriage of the two would be nice. I believe its fairly
straight forward to call unmanaged code from within a C# application,
but calling a created (and managed) C# dll from within a non managed
language (in our case Perl) is a bit more though provoking. So you net
guru's is it possible and if so any good links on how to do it? I read
somewhere that you could use COM, to make the managed library
available but am unsure the steps involved. If that works I believe
Perl can access COM, so that might be a possiblility.
Thanks for any suggestions or help
-SteveM
 
C

carnold

I suspect that this is either not possible or really really tricky,
but need to ask. We have a great deal of work done in perl in our
environment, and we are currently starting to do more work with .Net
and C#. A marriage of the two would be nice. I believe its fairly
straight forward to call unmanaged code from within a C# application,
but calling a created (and managed) C# dll from within a non managed
language (in our case Perl) is a bit more though provoking. So you net
guru's is it possible and if so any good links on how to do it? I read
somewhere that you could use COM, to make the managed library
available but am unsure the steps involved. If that works I believe
Perl can access COM, so that might be a possiblility.
Thanks for any suggestions or help
-SteveM

SWIG enables you to do this by defining a class with virtual methods
in C++ and then implementing/overriding those methods in C#. That'll
get you C++ to C#; Perl into C++ shouldn't be too hard ... but it is a
lot of hoops to jump thru (tho still possibly easier than COM).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top