Old perl code in .NET RRS feed

  • Question

  • We're going to be programming our tools in C# in a few months, but will our old perl modules still run? They were written on a unix machine. Thanks!
    Thursday, October 9, 2008 4:19 PM




            You know if your old Perl modules could be in the format of Windows DLL files (Binary), we could call the methods in the module from Visual C#, by the help of P/Invoke.   Copy the module files to the same folder of your application files, then .NET P/Invoke will find the DLL file automatically.  And we could use some codes like the following to call the internal method.   Of course I only give the sample, you could so some modification here. 


                    static extern int Calculate(int a, int b);


            public Form1()



                MessageBox.Show(Calculate(1, 1).ToString());


             Besides, here are some good articles on how to use P/Invoke:


    Best Regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, October 13, 2008 7:02 AM