Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

OLE automation server

by chinman (Monk)
on Jun 11, 2001 at 22:06 UTC ( #87598=perlquestion: print w/replies, xml ) Need Help??

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

Does anyone know if and how Perl can be used as an OLE automation server, e.g. other client applications such as Excel can control a Perl executable. I see it is possible to use Perl as the client with Win32::OLE...but not as the server. Any help would be appreciated.

Replies are listed 'Best First'.
Re: OLE automation server
by iakobski (Pilgrim) on Jun 12, 2001 at 12:35 UTC
    Yes, you can build a COM/ActiveX server using ActiveState's PerlCtrl, in the Dev Kit. I have used this for turning Perl modules into COM objects that can be accessed from VB. It does a remarkably good job of converting the COM datatypes into Perl's scalars, hashes and lists.

    There are a few quirks, and I suggest starting with a hello, world and moving on in short steps. The only downside is that the DLL starts at around 1Mb for the simplest object.

    -- iakobski

      Yeah, it is great!

      The DLL size can be as small as 20k if you don't go for a freestanding DLL. You only need the freestanding DLL if perl isn't installed on the target computer.

      $code or die
      $ perldoc perldoc
Re: OLE automation server
by John M. Dlugosz (Monsignor) on Jun 11, 2001 at 22:29 UTC
    I have not tried this, but I've thought about using "script components" with PerlScript. Bascically, this will run your script as a server, and it works with any scripting language installed as an ActiveX Scripting Engine.

    Also, ActiveState sells something for that in their DevKit.

    —John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://87598]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2022-10-02 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (7 votes). Check out past polls.

    Notices?