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.In reply to Call a function from DLL by Cleware
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |