Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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


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.


Replies are listed 'Best First'.
Re^2: Access .net object from PERL
by jimbojones (Friar) on Apr 26, 2006 at 16:04 UTC

    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.

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?

      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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-01-25 03:16 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (65 votes). Check out past polls.