lass es mal so laufen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sub FT_OpenPM{
my ( $self, $devNum ) = @_;
my $status = $self->{'FT_STATUS'};
my $handle = $self->{'FT_HANDLE'};
#import function
my $fct_open = new Win32::API( 'FTD2XX', 'FT_Open', 'IP', 'I' );
unless( $fct_open ){
print("FT_Open not found!\n");
return 0;
}
#call imported function
$status = $fct_open->Call( $devNum, $handle );
print "[$handle]\n";
$handle =~ s/\0.*$//;
print "[$handle]\n";
#$handle = Storable::retrieve( $handle );
#return the functions return status and the handle
return ($status, $handle);
und poste diese zwei zeilen.
hätt gern mal gewusst, was drin steht!