Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 20, 2007, 1:53 pm
rate this thread
I have a dll by name AduHid.dll.
There is a function with prototype
void * _stdcall OpenAduDeviceBySerialNumber(const char*
psSerialNUmber,unsigned long iTimeout);
I used the following perl code to call the above function
my $function = Win32::API->new(
char* psSerialNUmber,unsigned long iTimeout)' );
my $return = $function->Call("A03744",0);
But i get an error
1. unknown parameter type const and unsigned
2. Argument A03744 isnt numeric in subroutine entry.
I tried removing const and unsigned.Then I got an error
"Modification of read only value attempted".
Where am i going wrong?
Re: Help on Win32 API
On 06/20/2007 08:53 AM, jis wrote:
I don't have access to a Windows computer, but I was able to download
the CPAN source for Win32::API. Read the POD for Win32::API::Types. It
says you should examine the __DATA__ section of Win32/API/Types.pm to
see a list of supported types.
You might need to specify a prototype like this:
int OpenAduDeviceBySerialNumber(PCHAR psSerialNUmber, ULONG iTimeout)
I hope this helps some.
- » Installation error for module in CentOS 5.0 for HTML::Mason
- — Previous thread in » PERL Modules Announcements