walto has asked for the wisdom of the Perl Monks concerning the following question:
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.#!/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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Correct call for dll with Win32::API
by BrowserUk (Patriarch) on Dec 04, 2008 at 16:21 UTC | |
by walto (Pilgrim) on Dec 04, 2008 at 18:07 UTC | |
by BrowserUk (Patriarch) on Dec 04, 2008 at 20:14 UTC | |
Re: Correct call for dll with Win32::API
by ikegami (Patriarch) on Dec 04, 2008 at 18:30 UTC | |
by walto (Pilgrim) on Dec 04, 2008 at 20:15 UTC | |
by ikegami (Patriarch) on Dec 04, 2008 at 20:24 UTC | |
by walto (Pilgrim) on Dec 04, 2008 at 20:38 UTC | |
by BrowserUk (Patriarch) on Dec 04, 2008 at 20:53 UTC | |
| |
by ikegami (Patriarch) on Dec 04, 2008 at 20:57 UTC |