Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Access .net object from PERL

by jimbojones (Friar)
on Apr 24, 2006 at 18:41 UTC ( #545351=note: print w/ replies, xml ) Need Help??


in reply to Access .net object from PERL

Hi

Another possibility is that the .NET dlls can be exported as COM objects, and then you could access them as usual. Depends on the 3rd party, I guess.

You could write a .NET wrapper to the 3rd party code that calls the methods you want, and then you can export your wrapper code to COM. I've been doing some of this lately (exporting .NET to COM for 'legacy' apps), so /msg me if it's something you'd want more details on.

HTH, J


Comment on Re: Access .net object from PERL
Re^2: Access .net object from PERL
by bart (Canon) on Apr 24, 2006 at 19:10 UTC
    What does "as usual" mean, in Perl terms?
      Hi

      Sorry, "as usual" was probably an over-statement. The OP said "It was easy enough to do the old OLE or COM objects," so I assume there is some way to do it with COM objects through Win32::OLE. My experience of late has been to invoke .NET dlls from legacy C apps through COM wrappers. I haven't done this with Perl, but putting it all together (.NET -> COM -> Perl thru OLE ) should work.

      - j

Re^2: Access .net object from PERL
by jimbojones (Friar) on Apr 26, 2006 at 16:04 UTC
    Hello

    As a follow-up to the above, here's how you can wrapper .NET code and expose it to COM, making it available to Perl. The following example wrappers the .NET System.Console.Write and System.Console.WriteLine methods.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://545351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2014-09-24 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (244 votes), past polls