in reply to Calling COM method

  1. You created the Win32::OLE object as $RL but you're trying to use $RiskLib in the next line.
  2. my $myoutput = $RiskLib->RiskLibVersion->Call(1); does not appear to be a direct translation of call MyObject.RLVersion(1,y) so how did you arrive at this Perl statement?

Replies are listed 'Best First'.
Re^2: Calling COM method
by StephenLL (Initiate) on Feb 05, 2005 at 23:04 UTC
    RL vs RiskLib : I just copied the code over wrong. Sorry about that.

    My problem is that I don't know how to translate the CALL to perl. I have tried and searched through the perldocs, win32::api, this site and googled. When I try the following I get the error "Can not call method "RiskLibVersion" on an undefined value at myprog.pl line 3

    use Win32::OLE qw(in with); my $RL = Win32::OLE->new('RiskLib.RiskLibclass') or die "oops\n"; call $RL->RiskLibVersion(1,$y); print $y;

    Thanks

    Stephen