473,624 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Dec 7 '07 #1
1 1728
On Dec 7, 11:44 am, SteveM <steve.mo...@ph ilips.comwrote:
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).

Dec 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4242
by: Fadly Tabrani | last post by:
Hi guys, This is the first time I'm posting to the newsgroup, hope you can help out. I'm writing a module to interface with the task scheduler in windows using PyWin32. Everything has been great so far but I'm stuck on displaying the propertys page of a task. Here's the code: import pythoncom import win32api
1
3204
by: sunil s via DotNetMonster.com | last post by:
Hi, I've got a native C++ app which calls a 3rd parth .NET DLL using the LoadLibrary/GetProcAddress functions. This works fine when the DLL is located in the app directory, but if I move it out to it's own directory, then I get a FileNotFoundException. I've tried manipulating the app.exe.config file's <codebase> parameter, but this doesn't seem to have any effect, possibly because the DLL does not have a strong name. The only thing...
0
414
by: Eugene Safrankow | last post by:
Hello All! I've encountered with the error when I call a method of dependency library (written in managed VC++) from Smart Client placed on a web page. In general, I make a call to the Windows function and I get from GetLastError – "<127> The specified procedure could not be found" error. Below is more detailed information about the problem.
2
1738
by: hykim | last post by:
I want to call a unmanaged dll's function returning some STRUCT's pointer. the next is definition of a STRUCT. ----------------------------------------------------------------------- typedef struct myStruct{ struct { UINT_PTR anything; UCHAR anything2; } myInnerStruct;
2
8273
by: Bret Pehrson | last post by:
I just need to confirm now (after I've spent several days chasing mystery metadata warnings/errors) that this is *NOT* possible: Link a managed C++ static library into a (managed) C# application. NOT POSSIBLE? Please respond *only* if you *know* the answer, I'm not interested in conjecture.
8
19886
by: Paul | last post by:
Hi all may I know how to use C# DLL inside my VC++ Project ? Thanks in advance.
12
1942
by: Ricky | last post by:
Hi I know that we can call C++ code from C# using COM interop, how about do the reverse? Ricky
13
4117
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
4
1683
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project that build a class library dll. Here we have a class called C We have one dependency and that is from the user control to the class library because in the constructor for class B in the user control we have a call to
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.