Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Re: Where's the result??? (problem with Win32::OLE)

by jpavel (Sexton)
on Mar 27, 2003 at 15:00 UTC ( [id://246244]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Where's the result??? (problem with Win32::OLE)
in thread Where's the result??? (problem with Win32::OLE)

jand, is there I way I can up your guru score? Again, I had to pass:
my $keys = Variant(VT_BYREF|VT_VARIANT, 0);
But that did it! I'm ecstatic to have a solution, but I don't fully understand it... what was wrong with using VT_ARRAY? I don't quite get the Dim function, nor why the array is mulitdimensional (or appears to be... we're going from [0][0] .. [0][1]?). I've probably harassed jand enough... can anyone pose an explanation?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Where's the result??? (problem with Win32::OLE)
by jand (Friar) on Mar 27, 2003 at 22:24 UTC
    You are probably using an older version of Win32::OLE if you have to provide the second argument to Variant() in this case.

    The Dim() method returns a list of array bounds. Each element of the list is an array ref to a 2 element array containing the lower and the upper bound of that dimension. Although SAFEARRAYs typically have a lower bound of 0, this is not always true.

    So by iterating from $dim[0][0] .. $dim[0][1] we go from the lower to the upper bound of the first dimension of the underlying SAFEARRAY. Ideally, you should check that the returned VARIANT is actually an array, and that the @dim array only contains a single element.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://246244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-26 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found