Re: Help on Win32 API
- From: "Mumia W." <paduille.4061.mumia.w+nospam@xxxxxxxxxxxxx>
- Date: Wed, 20 Jun 2007 15:44:46 GMT
On 06/20/2007 08:53 AM, jis wrote:
Hi,
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
use Win32::API;
my $function = Win32::API->new(
'AduHid.dll','int OpenAduDeviceBySerialNumber(const
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?
Please advise.
regards,
jis
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.
.
- References:
- Help on Win32 API
- From: jis
- Help on Win32 API
- Prev by Date: Help on Win32 API
- Next by Date: Re: Spread***::Read 0.20
- Previous by thread: Help on Win32 API
- Next by thread: Re: Help on Win32 API
- Index(es):