use 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; }