in reply to Trying to re-write some VB-OLE into PERL-OLE

you need pass variant by reference.

Get idea from my post at Re: Win32::OLE and WMI

  • Comment on Re: Trying to re-write some VB-OLE into PERL-OLE

Replies are listed 'Best First'.
Re^2: Trying to re-write some VB-OLE into PERL-OLE
by juo (Curate) on Sep 24, 2004 at 04:32 UTC

    courage, you made my day today, it is indeed the usage of Variants that was required in this case, still a little bit difficult for me to understand but at least I can make it work and move on now. Thanks a lot and thanks to jdporter for having faith in me, he gave me the courage to keep looking, and it did not take six months. :-). Just for the record the piece of code.

    for my $placement ( in $Recipe->Placements) { my $PartNum = Variant(VT_VARIANT|VT_BYREF, ""); $Library->FindPart($placement->PlacementPart->Part->Name, +$PartNum); my $FeederType = Value{$PartNum}->MachineValue("FEEDERWIDT +H") ; }