B
bg-greece
I am using cygwin and perl and trying to access some function from a C++
windows dll. After the first attempt produced a segmentation fault, I tried
to do it step-by-step. I created a dummy function in the dll file:
int TestDLL(int x)
{
return 1;
}
and put the following code in a perl file:
use strict;
use Win32::API:rototype;
my $TestDLL = ApiLink("mydll",'I TestDLL(I x)');
if (not defined $TestDLL) {
die "Can't import API TestDLL: $! \n";
}
print "ApiLink done\n";
my $xx = 0;
my $return = $TestDLL->Call($xx);
print $return."\n";
But even this produces a segmentation fault (core dump). Any ideas?
BG
windows dll. After the first attempt produced a segmentation fault, I tried
to do it step-by-step. I created a dummy function in the dll file:
int TestDLL(int x)
{
return 1;
}
and put the following code in a perl file:
use strict;
use Win32::API:rototype;
my $TestDLL = ApiLink("mydll",'I TestDLL(I x)');
if (not defined $TestDLL) {
die "Can't import API TestDLL: $! \n";
}
print "ApiLink done\n";
my $xx = 0;
my $return = $TestDLL->Call($xx);
print $return."\n";
But even this produces a segmentation fault (core dump). Any ideas?
BG