Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-08-13 05:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found