in reply to Call C DLL Functions in Perl

Just like you did for (2).

$return = $dec->Call($strDatabase, $strLoginUser, $strLoginPwd);

That said, what you have amounts to strings terminated with two NULs, so it should work too.

Replies are listed 'Best First'.
Re^2: Call C DLL Functions in Perl
by sraghu_rs (Initiate) on Feb 09, 2012 at 12:09 UTC

    @ikegami - Even after passing like that, it is not working.

      Maybe "test" is not a valid database/user/password?
      I said as much, but it is the proper usage based on the information you posted. Is there anything to make you think it's a problem with how you call the function?
        I think the issue is in the data types. I char *strDataSource is not properly being sent to the DLL from Perl. If there is a way to mimic the C data type (char *) in Perl, the problem might be resolved. Do you have any thoughts on the data type conversion between C and Perl?
        I think the issue is in the data types. I char *strDataSource is not properly being sent to the DLL from Perl. If there is a way to mimic the C data type (char *) in Perl, the problem might be resolved. Do you have any thoughts on the data type conversion between C and Perl?