Cleware has asked for the wisdom of the Perl Monks concerning the following question:
I tried to call a function from an external DLL which written in C++ but actually I got always Errors.
-The C++ header :===================================================USBACCESS_API CUSBaccess * _stdcall FCWInitObject(void) + ; USBACCESS_API void _stdcall FCWUnInitObject(CUSBaccess +*obj) ; USBACCESS_API int _stdcall FCWOpenCleware(CUSBaccess *o +bj) ; USBACCESS_API int _stdcall FCWCloseCleware(CUSBaccess * +obj) ;
-What I wrote:
===================================================#!usr/bin/perl use Win32::API; my $function1=Win32::API->Import( 'D:\Cleware\USBaccess.dll', 'int FCWInitObject()', ); my $return = $function1; Print($return);
- What I got:
Undefined subroutine &main::Print called at script.pl line 8.
===================================================Does anyone have any idea?
thanks in advance...
*I just new in Perl and have no idea before.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Call a function from DLL
by Discipulus (Canon) on Jul 15, 2019 at 06:51 UTC | |
by Cleware (Novice) on Jul 15, 2019 at 07:49 UTC | |
by GrandFather (Saint) on Jul 15, 2019 at 08:18 UTC | |
by Cleware (Novice) on Jul 15, 2019 at 10:24 UTC | |
by GrandFather (Saint) on Jul 16, 2019 at 00:51 UTC | |
by holli (Abbot) on Jul 15, 2019 at 08:45 UTC | |
|
Re: Call a function from DLL
by holli (Abbot) on Jul 15, 2019 at 08:35 UTC | |
by Cleware (Novice) on Jul 15, 2019 at 10:19 UTC | |
by holli (Abbot) on Jul 15, 2019 at 11:19 UTC | |
by holli (Abbot) on Jul 15, 2019 at 10:55 UTC |