I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-04-23 15:25:28-07 by gwampach
Pointer parameter problem.
Hello,
I'm a new Perl programmer and I'm using the Win32::API module to use functions of a C dll.
I'm using ActivePerl 5.8.8.

Here is the C code of the function I need to use:
const char* DecodeSomething(GUInt64 time, GUInt16 msgId, GUInt16 bodyLength, GUInt8 dxpNum, GUInt8* + bodyData);

So I mapped this function in Perl like this:
$decodeSomething = Win32::API->new($dll, 'DecodeSomething', 'IIIIP', 'P');

And I try to use it like this:
$data = [0x03, 0x00, 0x13, 0x15, 0x3B]; $decodedRecord = $decodeSomething->Call(0xB4B65BBB, 0x0F, 0x20, 0x1, $data);

But running this code raise a "Perl command line interpreter error'.

Thanks in advance for your help.
Direct Responses: Write a response