I have a Windows DLL that I want to call from Perl. The prototype for the exported function is:
int __stdcall func(const char*, int, int, int, double, double, void**);
The last parameter returns a pointer to an object that is allocated in the function.
The perl code –
my $dll_path = "../stage/test_dll.dll";
my $dll_func = new Win32::API($dll_path,
'func',
'PIIIDDP', 'I');
my $data = "test something here";
my $pResult = 0;
my $rc = $ dll_func ->Call($data, 0, 0, 9, 0.6, 0.3, $pResult);
An error message popped up saying that the memory can’t be written. Maybe I can’t use P to represent void**? I read through all the documentation and could not locate a single example that uses void** parameter. Help!