use Win32::API; my $dec = Win32::API->new('mydll.dll', 'CurrentDate', '', 'L') or die $^E; my $rv_bstr = $dec->Call(); ($sec,$min,$hour,$day,$month,$year) = localtime($rv_bstr); # correct the date and month for humans $year = 1900 + $year; $month++; printf "%02d/%02d/%02d %02d:%02d:%02d\n", $year, $month,$day, $hour, $min, $sec; #### use Win32::API; my $dec = Win32::API->new('mydll.dll', 'GetVersion', 'PN', 'L') or die $^E; my $lpBuffer = " " x 64; $return = $dec->Call($lpBuffer, 64); print $lpBuffer; #### use Win32::API; my $dec = Win32::API->new('mydll.dll', 'OpenConnection', 'PPP', 'L') or die $^E; $strDatabase = "test"; $strLoginUser = "test"; $strLoginPwd = "test"; # converting to C String $db = pack('a*x', $strDatabase); $user = pack('a*x', $strLoginUser); $pwd = pack('a*x', $strLoginPwd); $return = $dec->Call($db, $user, $pwd); print $return;