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

C# and active states PerlCOM

by mdupont (Scribe)
on May 16, 2002 at 15:25 UTC ( #167027=perlquestion: print w/replies, xml ) Need Help??
mdupont has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monk,

Maybe you have experience with PerlCom a Com object that contains perl.

Following is attempt at C# code to access the PerlCom Com lib via the .NET dynamic dispatch reflection interface.

I am getting a MissingMethodException exception, can you please advise if I am doing something wrong?

PerlCOMLib.PerlCOMClass Perl = new PerlCOMLib.PerlCOMClass(); Perl.EvalScript ("sub test{ return 1;};"); Type t = Perl.GetType(); Object ret = null; try { t.InvokeMember( "test", System.Reflection.BindingFlags.InvokeMethod, null, ret, null); // print the result textBoxResult.Text = ret.ToString() ; } catch (System.MissingMethodException mme) { // print the result textBoxResult.Text = mme.ToString() ; }

Replies are listed 'Best First'.
Re: C# and active states PerlCOM
by c-era (Curate) on May 16, 2002 at 17:40 UTC
    With out seeing the perl code, I can't give you any advice.

    Although, you may want to try perlNET from active state (it is included in the devkit). I've personally used it, and while there are a few issues, it works resonably well (definitely easier to integrate with C#).
      Sorry but the perl code was there.

      It is just really small.

      Perl.EvalScript ("sub test{ return 1;};");

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://167027]
Approved by broquaint
[karlgoethebier]: Discipulus: Just a typo in this case ;-)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2017-05-24 09:06 GMT
Find Nodes?
    Voting Booth?