in reply to Win32::API question

You mixed and matched the 2- and 4-arg version, and you don't actually pass your arguments?!
use Win32::API; my $prwin1 = Win32::API->new('OH-DLL.dll', 'prwin1', 'PP', 'D') or die("Error linking to prwin1: $^E\n"); sub pl_prwin { my $hands = "AhKh|Td9s|QQ+,AQs+,AQo+|JJ-88|XxXx|XxXx|XxXx"; my $board = "Ks7d4d"; return $prwin1->Call($hands, $board); }

Update: Fixed return type, as per tye's reply. Forgot to check that. Also added error message.

Replies are listed 'Best First'.
Re^2: Win32::API question
by gbotzz (Novice) on Apr 25, 2009 at 03:40 UTC
    Thank you, unfortunately that didn't work. Is there any thing I need to check on the DLL side?

      According to the docs, Win32::API, 'N' is long. For double, you want 'D'.

      Anybody ever tell you that "didn't work" is a pretty useless error report? :)

      - tye        

        Well, like I said, nothing was returned with no error message, so if you know a better term that "didn't work" I'm all ears. :) Also, D is double, and that's what I had.