I want to call HCE300_API.DLL with Win32::API. I use this script which crashes the Perl interpreter when calling $readdevice:
#!/usr/bin/perl
use strict;
use warnings;
use Win32::API;
my $com = 1;
my $opencom =Win32::API->new (
'HCE300_API.DLL', 'int HCE300_Open(int ComPort)',
)or die $^E;;
my $closecom = Win32::API->new (
'HCE300_API.DLL', 'int HCE300_Close()',
)or die $^E;;
my $getdevicetype = Win32::API->new (
'HCE300_API.DLL', 'int HCE300_GetDeviceType()');
my $resetdevice = Win32::API->new (
'HCE300_API.DLL', 'int HCE300_Reset(int ResetWay)'
+);
my $readdevice = Win32::API->new (
'HCE300_API.DLL', 'int HCE300_Read(int TrackNo(int
+ TrackNo,char *ReadData )');
my $setdialog = Win32::API->new (
'HCE300_API.DLL', 'int HCE300_SetShowDialog(int In
+Flag)');
#print $getdevicetype->Call(),"\n";
my @in;
my $ret = $opencom->Call ($com);
print "$ret\n";
$resetdevice->Call (1);
my $dialog = $setdialog->Call(1);
my @strip = $readdevice->Call(2,\@in);
my $cl = $closecom->Call();
print "$cl\n";
I have no usable documentation only a sample for C-code from which I took the function for the prototype. Since I have zero knowledge of C any help is appreciated.