jimbojones has asked for the wisdom of the Perl Monks concerning the following question:
If I redefine the PerlTest function to take no input arguments, (i.e. return some static number), it works correctly. Also, the examples given in the POD concerning kernel32.dll functions also work correctly, including those with input arguments. This leads me to suspect I'm missing something when creating the C test.dll I'm using AS 586.811 and Win32::API v0.41 that I got through PPM from AS. Thanks in advance, Jimuse strict; use Win32::API; my $winPerlTest = Win32::API->new( 'test', 'PerlTest', 'I', 'I'); die "Can't import API PerlTest: $!\n" unless ( defined $winPerlTest); my $id = 137; my $return; $return = $winPerlTest->Call($id); print $return, "\n"; __DATA__ /* declaration of PerlTest C-function */ int PerlTest(int a) { return a+1; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Help avoiding exception in Win32::API ?
by Tanktalus (Canon) on Sep 14, 2005 at 21:10 UTC | |
by jimbojones (Friar) on Sep 14, 2005 at 22:24 UTC | |
Re: Help avoiding exception in Win32::API ?
by PodMaster (Abbot) on Sep 15, 2005 at 07:53 UTC | |
by jimbojones (Friar) on Sep 16, 2005 at 14:18 UTC | |
Re: Help avoiding exception in Win32::API ?
by jimbojones (Friar) on Sep 14, 2005 at 22:06 UTC |