|
Posted by Thorsten Walenzyk on October 22, 2004, 10:06 am
Please log in for more thread options
Hi all,
I want to control LabWindows/CVI via ActiveX from Perl. So far I managed to
start the ActiveX server of CVI and I can also load a project. See code:
use Win32::OLE;
my $cvi = Win32::OLE->new('CVI.Application') or die "Oops, cannot start
CVI";
$cvi->OpenProject("C:\USERS\tp_remix_443\tp_remix_443.prj");
But I have some problems to get some information back from the ActiveX
server, if I used call by reference.
$result = $cvi->GetNumProjectFiles($number);
printf "<$result ><$number>n";
-> Output: <><0>
The $number is not filled by the called function.
Even if I assign any value to $number before calling GetNumProjectFiles(),
the value is not changed by the called function.
$number = "42";
$result = $cvi->GetNumProjectFiles($number);
printf "<$result ><$number>n";
-> Output: <42><0>
Is it possible at all to use call by reference with Win32::Ole???
I found many examples which are using Excel, Word, Outlook and so on, but
they are only using the return value rather than any call by reference.
Thanks a lot, Thorsten
|