Hello all,
I would like to translate the following vb(a) code over to Perl but I have not had any success. I have read the doc on win32 and ole but I can not get this to work.
I have a COM DLL which has a method called RLVersion. The way I call it in VBA is the following:
Set MyObject = CreateObject("RL.RLClass")
call MyObject.RLVersion(1,y)
msgbox(y)
The 1 tells it the number of output arguements and y is obviously the output arguement. It passed back a 6 character string.
and this works fine.
Here is one of my many attempts at converting it to Perl. The WIn32::OLE works, but calling the RLVersion (method) does not.
use Win32::OLE qw(in with);
my $RL = Win32::OLE->new('RL.RLlass') or die "oops\n";
my $myoutput = $RiskLib->RiskLibVersion->Call(1);
I would appreciate any help. I need to prove that this can work before I can start to learn perl and move completely away from vb/vbscript.
Thanks for any help you can provide.
Stephen
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.