I wonder if someone can help me...

I've got an OLE Automation application that I need to query in Perl. I've 
installed it properly, and the following test samples work correctly in 
Visual Basic and Visual FoxPro respectively. However, my translation of the 
code into Perl results in errors. What do I need to alter to have this code 
translated properly?

The errors that I get are several data mismatch errors and "function 
argument value type or count is invalid" errors, then a few "variable not 
found" (internal variables to the application) and then Perl process 
crashes.

The only thing I can think of is that Perl always passes parameters as 
strings, and this DLL is expecting different formats, e.g. 
logical/numeric/date types. If so, how would I solve this?

Any help would be greatly appreciated!

Ben


Visual Basic:

Private Declare Sub qzole Lib "c:\qzole\qzole.dll" ()

Sub prem()

Dim oprem As Object
Set oprem = CreateObject("qzole.classqzole")

oprem.calcphi "LICC", "M", 33, "", False, False, "A", "", 0, "", 0, "", 
False, False, "", 0, 0, 2000, "M", 1, 65, 1, False, False, 100, 200, 
"A115827N"

MsgBox (oprem.premium)

End Sub

==================================================

Visual FoxPro:

SET DEFAULT TO c:\qzole

oPrem = CREATEOBJECT("qzole.classqzole")

oPrem.calcphi('LICC', 'M', 33, {}, .F., .F., 'A', '', 0, ;
        '', 0, {}, .F., .F., '', 0, 0, 2000, 'M', 1, 65, 1, .F.;
         .F., 100, 200, 'A115827N')

? oPrem.premium

==================================================


My Perl Code:


use strict;
use Win32::OLE;

my $oPrem = Win32::OLE->new('qzole.classqzole');

$oPrem->calcphi("LICC","M",33,0,0,0,"A","",0,
                "",0,0,0,0,"",0,0,2000,"M",1,65,1,0,0,
                100,200,"A115827N");

print $oPrem->premium;
print "\n";

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to