#!/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 InFlag)'); #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";