Sprad has asked for the wisdom of the Perl Monks concerning the following question:

Is there a relatively painless way to embed Perl in a VB application? If possible, I'd like to hijack VB's GUI-creation tools while still relying on Perl for the heavy lifting. I know I can call a script externally, but I'd like the whole thing to compile into a single .exe in the end.

---
A fair fight is a sign of poor planning.

  • Comment on Calling Perl from Hel^H^H^HVisual Basic

Replies are listed 'Best First'.
Re: Calling Perl from Hel^H^H^HVisual Basic
by MeowChow (Vicar) on Jul 18, 2001 at 02:15 UTC
    ActiveState's PDK offers PerlCtrl and PerlCOM for this task.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
Re: Calling Perl from Hel^H^H^HVisual Basic
by John M. Dlugosz (Monsignor) on Jul 18, 2001 at 03:02 UTC
    Use a "Windows Script Component". The eg directory in ActiveState's distribution has an example that does exactly this! It calls Perl code (in a .WSC file) from a Visual Basic Script file. Since it's just like any other COM component, you can call from regular VB just as easily.

    —John

Re: Calling Perl from Hel^H^H^HVisual Basic
by TGI (Parson) on Jul 18, 2001 at 02:11 UTC

    Win32::API lets you call or import functions from any 32 bit DLL, it might help. You might want to consider using Win32::Gui, if you're not too wedded to VB.


    TGI says moo