Click here to get back home

Win32::Ole and Call by reference

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Win32::Ole and Call by reference Thorsten Walenzyk 10-22-2004
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




Posted by Brian McCauley on October 23, 2004, 10:23 am
Please log in for more thread options
Thorsten Walenzyk wrote:

> Is it possible at all to use call by reference with Win32::Ole???

Yes but you have to read the documentation right to the end - that's
where the instructions are hidden.

I've not used Win32::OLE in years but back from the days when I did here
are my contibutions some previous threads asking this exact same
question (including the one where I asked the question):

http://groups.google.com/groups?selm=u9u1bmzu69.fsf%40wcl-l.bham.ac.uk
http://groups.google.com/groups?selm=u9d76ymutp.fsf%40wcl-l.bham.ac.uk
http://groups.google.com/groups?selm=u9pues8xjg.fsf%40wcl-l.bham.ac.uk



Similar ThreadsPosted
Crypt::CBC Can't call method "blocksize" on unblessed reference July 12, 2004, 10:01 am
MockObject - reference September 25, 2007, 9:03 am
Quick Perl, HTML, CSS, JavaScript reference April 26, 2006, 10:34 am
How to call PL/SQL procs using Oraperl ? December 8, 2004, 5:22 pm
How can I call MFC functions from Perl July 19, 2005, 9:46 pm
Parsing XML data as it arrives from LWP call January 11, 2005, 1:57 am
System call fails in webserver February 11, 2006, 11:04 am
Can't call method on an undefined value at June 27, 2005, 2:56 pm
Stored Procedure call using MSSQL::DBLIB April 6, 2006, 5:06 pm
PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please. July 13, 2004, 4:06 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap