note
BrowserUk
<blockquote><i></i></blockquote>
<p>I've never heard of "optional" arguments to a C routine. A variable number as with <c>int printf( char *t, ... )</c>, but not optional.
<P>If you're going to access a vararg function using [mod://Win32::API], you would need to do something hinky like create one API mapping for each number of args you are likely to use and then call the appropriate variant:
<code>
use Win32::API;
$function2 = Win32::API->new(
'mydll', 'sum_integers', 'II', 'I',
);
$function3 = Win32::API->new(
'mydll', 'sum_integers', 'III', 'I',
);
$function4 = Win32::API->new(
'mydll', 'sum_integers', 'IIII', 'I',
);
$function5 = Win32::API->new(
'mydll', 'sum_integers', 'IIIII', 'I',
);
$function6 = Win32::API->new(
'mydll', 'sum_integers', 'IIIIII', 'I',
);
</code>
<p>Not pretty, but it ought to at least work.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.</div>
<div>[http://news.bbc.co.uk/1/hi/education/6202877.stm|"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."]</div>
</font>
</div></div>
656658
656658