From
perldoc Win32::API:
The third parameter, the input parameter list, specifies how many
arguments the function wants, and their types. It MUST be passed
as a list reference. The following forms are valid:
[a, b, c, d]
\@LIST
so make up a reference to an anonymous list as:
my $arr = [ pack("d",1), pack("d",1.5), pack("d",3) ];
# or as I would do it...
my $arr = [ map { pack 'd', $_ } ( 1, 1.5, 3 ) ];
The
[] square brackets make an anonymous array so the scalar
$arr (which you need to supply to the Call method of Win32::API) contains a reference to that array.
You could as easily do:
my @arr = map { pack 'd', $_ } ( 1, 1.5, 3 );
and then pass a reference to the list (
\@arr) - whichever you prefer.
Hope this helps
larryk
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"